home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 7: Sunsite / Linux Cubed Series 7 - Sunsite Vol 1.iso / system / network / samba / patches / samba-1.011 / samba-1
Encoding:
Text File  |  1996-01-15  |  80.4 KB  |  2,638 lines

  1. diff -u -r --new-file last-version/docs/DOMAIN.txt samba-1.9.15p7/docs/DOMAIN.txt
  2. --- last-version/docs/DOMAIN.txt    Thu Jan  1 10:00:00 1970
  3. +++ samba-1.9.15p7/docs/DOMAIN.txt    Mon Jan 15 19:58:59 1996
  4. @@ -0,0 +1,59 @@
  5. +Samba now supports domain logons and network logon scripts. The
  6. +support is still experimental, but it seems to work.
  7. +
  8. +The support is also not complete. Samba does not yet support the
  9. +sharing of the SAM database with other systems yet, or remote
  10. +administration. Support for these kind of things should be added
  11. +sometime in the future.
  12. +
  13. +Using these features you can make your clients verify their logon via
  14. +the Samba server and make clients run a batch file when they logon to
  15. +the network. The latter is particularly useful.
  16. +
  17. +To use domain logons you need to do the following:
  18. +
  19. +1) Setup nmbd and smbd and configure the smb.conf so that Samba is
  20. +acting as the master browser. See INSTALL.txt and BROWSING.txt for
  21. +details. 
  22. +
  23. +2) create a share called [netlogon] in your smb.conf. This share should
  24. +be readable by all users, and probably should not be writeable. This
  25. +share will hold your network logon scripts.
  26. +
  27. +For example I have used:
  28. +
  29. +   [netlogon]
  30. +    path = /data/dos/netlogon
  31. +    writeable = no
  32. +    guest ok = yes
  33. +
  34. +
  35. +3) in the [global] section of smb.conf set the following:
  36. +
  37. +   domain logons = yes
  38. +   logon script = %U.bat
  39. +
  40. +the choice of batch file is, of course, up to you. The above would
  41. +give each user a separate batch file as the %U will be changed to
  42. +their username automatically. The other standard % macros may also be
  43. +used. You can make the btch files come from a subdirectory by using
  44. +soemthing like:
  45. +
  46. +   logon script = scripts\%U.bat
  47. +
  48. +4) create the batch files to be run when the user logs in. If the batch
  49. +file doesn't exist then no batch file will be run. 
  50. +
  51. +In the batch files you need to be careful to use DOS style cr/lf line
  52. +endings. If you don't then DOS may get confused. I suggest you use a
  53. +DOS editor to remotely edit the files if you don't know how to produce
  54. +DOS style files under unix.
  55. +
  56. +5) Use smbclient with the -U option for some users to make sure that
  57. +the \\server\NETLOGON share is available, the batch files are visible
  58. +and they are readable by the users.
  59. +
  60. +6) you will probabaly find that your clients automatically mount the
  61. +\\SERVER\NETLOGON share as drive z: while logging in. You can put some
  62. +useful programs there to execute from the batch files.
  63. +
  64. diff -u -r --new-file last-version/docs/README.jis samba-1.9.15p7/docs/README.jis
  65. --- last-version/docs/README.jis    Fri Nov 24 14:55:12 1995
  66. +++ samba-1.9.15p7/docs/README.jis    Mon Nov 27 10:55:51 1995
  67. @@ -34,12 +34,6 @@
  68.            $B$N(B16$B?J?t$rB3$1$k7A<0$K$J$j$^$9!#(B
  69.        $B$3$3$G!"(B':' $B$rB>$NJ8;z$KJQ99$7$?$$>l9g$O!"(Bhex $B$N8e$m$K$=$NJ8;z$r;XDj$7$^$9!#(B
  70.            $BNc$($P!"(B@$B$rJQ$o$j$K;H$$$?$$>l9g$O!"(B'hex@'$B$N$h$&$K;XDj$7$^$9!#(B
  71. -    cap:  7 bits $B$N(B ASCII $B%3!<%I0J30$N%3!<%I$r0J2<$N7A<0$GI=$9J}<0$H$$$&E@$G$O(B
  72. -          hex$B$HF1MM$G$9$,!"(BCAP (The Columbia AppleTalk Package)$B$H8_49@-$r;}$DJQ49(B
  73. -          $BJ}<0$H$J$C$F$$$^$9!#(Bhex$B$H$N0c$$$O(B0x80$B0J>e$N%3!<%I$N$_(B':80'$B$N$h$&$KJQ49(B
  74. -          $B$5$l!"$=$NB>$O(BASCII$B%3!<%I$G8=$5$l$^$9!#(B
  75. -          $BNc$($P!"(B'$B%*%U%#%9(B'$B$H$$$&L>A0$O!"(B':83I:83t:83B:83X'$B$H$J$j$^$9!#(B
  76. -
  77.      JIS $B%3!<%I$K$D$$$F$O!"0J2<$NI=$r;2>H$7$F2<$5$$!#(B
  78.      $B(#(!(!(!(((!(!(!(!(((!(!(!(!(((!(!(!(!(((!(!(!(!(((!(!(!(!(((!(!(!(!(!(!(!(!(!($(B
  79.      $B(";XDj(B  $B("4A;z3+;O("4A;z=*N;("%+%J3+;O("%+%J=*N;("1Q?t3+;O("Hw9M(B              $B("(B
  80. @@ -118,13 +112,13 @@
  81.  
  82.  5. $B$=$NB>(B
  83.  
  84. -  $B%3!<%IJQ49$O0J2<$NJ}!9$,:n$i$l$?%W%m%0%i%`$rMxMQ$7$F$$$^$9!#(B
  85. +  hex $B7A<0$NJQ49J}K!$O!"(B
  86. +
  87. +    $BBgLZ!wBgDM!&C^GH(B <ohki@gssm.otsuka.tsukuba.ac.jp>$B;a(B
  88.  
  89. -  hex $B7A<0(B       $BBgLZ!wBgDM!&C^GH(B <ohki@gssm.otsuka.tsukuba.ac.jp>$B;a(B
  90. -  cap $B7A<0(B       $BI%ED(B $BF;O:(B (michiro@po.iijnet.or.jp)(michiro@dms.toppan.co.jp)$B;a(B
  91. +  $B$,:n$i$l$?%3!<%I$rMxMQ$7$F$$$^$9!#(B
  92.  
  93.  1994$BG/(B10$B7n(B28$BF|(B $BBh#1HG(B
  94.  1995$BG/(B 8$B7n(B16$BF|(B $BBh#2HG(B
  95. -1995$BG/(B11$B7n(B24$BF|(B $BBh#3HG(B
  96.  $BF#ED(B $B?r(B  fujita@ainix.isac.co.jp
  97.  
  98. diff -u -r --new-file last-version/docs/SCO.txt samba-1.9.15p7/docs/SCO.txt
  99. --- last-version/docs/SCO.txt    Fri Dec  1 09:59:21 1995
  100. +++ samba-1.9.15p7/docs/SCO.txt    Mon Nov 27 10:55:51 1995
  101. @@ -1,4 +1,4 @@
  102. -There is an annoying TCPIP bug in SCO Unix. This causes corruption when
  103. +There is an annoying TCPIP bug in SCO Unix. This causes orruption when
  104.  transferring files with Samba.
  105.  
  106.  Geza Makay (makayg@math.u-szeged.hu) sends this information:
  107. @@ -9,8 +9,4 @@
  108.  You do not need anything else but the above patch. It installs in seconds,
  109.  and corrected the Excel problem. We also had some other minor problems (not
  110.  only with Samba) that disappeared by installing this patch.
  111. -
  112. -I've also heard that you need net382e (whatever that is!). This was
  113. -reported by Eigil Krogh Sorensen <eks@aar-vki.dk>.
  114. -
  115.  
  116. diff -u -r --new-file last-version/docs/Speed.txt samba-1.9.15p7/docs/Speed.txt
  117. --- last-version/docs/Speed.txt    Sun Dec  3 21:46:18 1995
  118. +++ samba-1.9.15p7/docs/Speed.txt    Mon Nov 27 10:55:51 1995
  119. @@ -113,19 +113,6 @@
  120.  read-write. For many applications that do their own locking this
  121.  doesn't matter, but for some it may.
  122.  
  123. -
  124. -MEMORY USAGE
  125. -------------
  126. -
  127. -The biggest user of memory is the MAXDIR option in local.h. This
  128. -determines how many open directories are cached in memory. If the
  129. -client access lots of large directories and doesn't explicitly close
  130. -then when finished then a large MAXDIR can use a lot of server memory.
  131. -
  132. -The default is 64. In most situations it is safe to reduce it to 16 or
  133. -even less. It must be at least 2 to operate correctly.
  134. -
  135. -
  136.  LOG LEVEL
  137.  ---------
  138.  
  139. diff -u -r --new-file last-version/docs/Support.txt samba-1.9.15p7/docs/Support.txt
  140. --- last-version/docs/Support.txt    Wed Nov 22 22:25:08 1995
  141. +++ samba-1.9.15p7/docs/Support.txt    Mon Jan 15 12:45:44 1996
  142. @@ -1,19 +1,22 @@
  143.  The Samba Consultants List
  144.  ==========================
  145.  
  146. -I often get asked about paid support for Samba. I don't have the
  147. -time/inclination to do this myself at the moment, so I decided to
  148. -compile a list of people who are prepared to install/support Samba.
  149. +This is a list of people who are prepared to install and support Samba.
  150. +Note that in most countries nobody should admit to "supplying" Samba, since 
  151. +there is then an implied warranty with possibly onerous legal obligations. 
  152. +Just downloading and installing it isn't supply in this sense, but advertising 
  153. +"run our Samba for best results" may be so.
  154.  
  155. -Being on this list does not imply any sort of endorsement, I just
  156. -provide this list in the hope that it will be useful.
  157. +Being on this list does not imply any sort of endorsement by anyone, it is just
  158. +provided in the hope that it will be useful.
  159.  
  160.  If you want to be added to the list, or want your entry modified then
  161. -contact me at the address below. I am currently listing them in the
  162. -order that I have received them. If it gets too big I may organise it
  163. -by region.
  164. +contact the address below. They are currently listed in the
  165. +order that they were received. If it gets too big we may organise it
  166. +by region. Please make sure to include a header line giving the region
  167. +and country, eg CANBERRA  - AUSTRALIA. 
  168.  
  169. -You can contact the maintainer at samba-bugs@anu.edu.au
  170. +You can contact the maintainers at samba-bugs@anu.edu.au
  171.  
  172.  
  173.  ------------------------------------------------------------------------------
  174. @@ -46,6 +49,8 @@
  175.  ------------------------------------------------------------------------------
  176.  
  177.  ------------------------------------------------------------------------------
  178. +ILLONOIS - USA
  179. +
  180.  Information One, Inc.
  181.  736 Hinman Ave, Suite 2W
  182.  Evanston, IL 60202
  183. @@ -210,4 +215,118 @@
  184.  >>              Software forensics                                       <<
  185.  >               Data translation                                        <
  186.  ------------------------------------------------------------------------------
  187. +
  188. +----------------------------------------------------------
  189. +Adelaide, Australia
  190. +
  191. +NS Computer Software and Services P/L
  192. +PO Box 86
  193. +Ingle Farm
  194. +SA 5098
  195. +
  196. +Contact: Richard Sharpe
  197. +     Ph: +61-8-281-0063 (08-281-0063) AH
  198. +     FAX:+61-8-250-2080 (08-250-2080)
  199. +
  200. +Experience with: ULTRIX, Digital UNIX, SunOS, WfW 3.11, Win95, WNT 3.51
  201. +
  202. +----------------------------------------------------------
  203. +
  204. +----------------------------------------------------------
  205. +TECTONIC LIMITED
  206. +WESTWOOD
  207. +78 LOUGHBOROUGH ROAD
  208. +QUORN
  209. +LEICESTERSHIRE
  210. +LE12 8DX
  211. +
  212. +TELEPHONE 01509-620922
  213. +FAX       01509-620933
  214. +
  215. +CONTACT DAVID ROBINSON
  216. +
  217. +WE ARE UNIX ORIENTATED BUT ALSO SPECIALISE IN PC TO UNIX COMMUNICATIONS, WE 
  218. +KNOW AND UNDERSTAND PC-NFS, (HENCE OUR INTEREST IN SAMBA).
  219. +WE SUPPORT  SUNOS, SOLARIS 1.X AND 2.X, HP-UX 9.0 AND 10.0, OSF (or DEC UNIX, 
  220. +whichever you prefer), WinNT, WfWG and Win95.
  221. +
  222. +WE ARE ALREADY TALKING TO A COUPLE OF VERY LARGE SAMBA USERS HERE IN THE UK. 
  223. +WE WOULD LIKE TO SUPPORT THEM (AND MANY MORE), WOULD YOU PLEASE CONTACT ME ON:
  224. +david@tectonic.demon.co.uk
  225. +----------------------------------------------------------
  226. +
  227. +----------------------------------------------------------
  228. +MIAMI, FL - USA
  229. +
  230. +Swaney & Associates, Inc.
  231. +ATTN:     Stephen Swaney
  232. +    2543 Lincoln Avenue
  233. +    Miami, Florida 33133
  234. +    U.S.A
  235. +    (305) 860-0570
  236. +
  237. +Specializing in:
  238. +    High Availability system & networks
  239. +    UNIX to PC connectivity
  240. +    Market Data systems
  241. +    Messaging Systems (Sendmail & Microsoft Exchange)
  242. +----------------------------------------------------------
  243. +
  244. +------------------------------------------------------------------------------
  245. +NEW JERSEY  - USA
  246. +
  247. +William J. Maggio                                       
  248. +LAN & Computer Integrators, Inc.
  249. +242 Old New Brunswick Road                              Email: bmaggio@lci.com
  250. +Suite 440                                               Voice: 908-981-1991
  251. +Piscataway, NJ 08855                                    Fax  : 908-981-1858
  252. +
  253. +   Specializing in Internet connectivity and security, Sun integration and 
  254. +   high speed, enterprise network design and deployment.
  255. +------------------------------------------------------------------------------
  256. +
  257. +FAREHAM - ENGLAND
  258. +
  259. +High Field Technology Ltd
  260. +Little Park Farm Road, Segensworth West,
  261. +Fareham, Hants PO15 5SJ, UK.
  262. +sales@hft.co.uk        tel +44 148 957 0111 fax +44 148 957 0555
  263. +
  264. +Company skills: Real time hardware and software systems
  265. +
  266. +Samba experience:  BSD/OS, Linux, LynxOS <==> WFWG, NT                     
  267. +
  268. +------------------------------------------------------------------------------
  269. +
  270. +-----------------------------------------------------------------------
  271. +QUEBEC - CANADA
  272. +
  273. +Dataden Computer Systems
  274. +Attn: Danny Arseneau
  275. +arseneau@parkmed.com
  276. +895 2nd Avenue
  277. +Ile Bizard, Quebec
  278. +Canada, H9C 1K3
  279. +Tel: (514)891-2293
  280. +Fax: (514)696-0848
  281. +
  282. +Dataden is company that specializes in Unix--TCP/IP networking.
  283. +We have over 15 years of experience.  We have been installing,
  284. +configuring and maintaining Samba for clients for 1-1/2 years now.  We
  285. +have samba installations on Linx, SunOS and DEC OSF.  Our biggest site
  286. +has 4 Suns and 3 Linux servers running Samba which are serving a network
  287. +of about 50 PC's running WFWg and Win95.
  288. +-----------------------------------------------------------------------
  289. +
  290. +-----------------------------------------------------------------------
  291. +CALIFORNIA - USA
  292. +
  293. +Ron Halstead
  294. +Open Systems Consulting
  295. +3098-4 Lakemont Drive
  296. +San Ramon, CA 94583 (San Francisco Bay Area)
  297. +(510) 735-7529
  298. +halstead@ix.netcom.com
  299. +-----------------------------------------------------------------------
  300. +
  301.  
  302. diff -u -r --new-file last-version/docs/addtosmbpass.1 samba-1.9.15p7/docs/addtosmbpass.1
  303. --- last-version/docs/addtosmbpass.1    Fri Nov 24 00:38:09 1995
  304. +++ samba-1.9.15p7/docs/addtosmbpass.1    Thu Jan  1 10:00:00 1970
  305. @@ -1,59 +0,0 @@
  306. -.TH addtosmbpass 1 "16 November 1995"
  307. -.SH NAME
  308. -addtosmbpass \- add entry for an existing account to a Samba password
  309. -file.
  310. -.SH SYNOPSIS
  311. -.B addtosmbpass
  312. -.I name
  313. -[
  314. -.I "name \&..."
  315. -]
  316. -.SH DESCRIPTION
  317. -.I addtosmbpass
  318. -is a utility for adding entries, in a proper format,
  319. -to a file used by Samba when validating passwords for clients (most
  320. -likely
  321. -.I "/usr/local/samba/lib/smbpasswd"
  322. -but this default can be changed in a compile time).  An old (possibly
  323. -empty as in
  324. -.I /dev/null
  325. -) Samba password file is expected on stdin and a new file, with
  326. -skeleton entries for arguments added, is printed on stdout.  A file
  327. -.I "/etc/passwd"
  328. -is scanned for a required information.
  329. -If an entry for a
  330. -.I name
  331. -is not present then account data are searched in NIS data bases -
  332. -if possible.  If an entry for
  333. -.I name
  334. -already exists in stdin input or it account information cannot be
  335. -found then this request is quietly skipped.
  336. -.SH FILES
  337. -.I "/usr/local/samba/lib/smbpasswd, /etc/passwd"
  338. -.SH "SEE ALSO"
  339. -smbpasswd(1), passwd(5), ypmatch(1)
  340. -.SH BUGS
  341. -.I addtosmbpass,
  342. -like other Samba password file utilities, is written
  343. -in
  344. -.I awk.
  345. -Although an attempt was made to accommodate various broken
  346. -variants of
  347. -.I awk
  348. -which may be around there is no guarantee that what you have 
  349. -is even worse.
  350. -.PP
  351. -It is assumed that if
  352. -.I ypmatch
  353. -program exists then NIS was set and the program will work.  This
  354. -may not be true.  In such case just comment out a line which sets
  355. -.B ypmatch
  356. -variable
  357. -in BEGIN block.
  358. -.PP
  359. -A location of awk interpreter at the top of the program may need
  360. -an adjustment.  Also a user may edit a program modifying it beyong
  361. -recognition.  This last property may be construed as a feature.
  362. -.SH AUTHOR
  363. -Michal Jaegermann (michal@ellpspace.math.ualberta.ca)
  364. -
  365. diff -u -r --new-file last-version/docs/nmbd.8 samba-1.9.15p7/docs/nmbd.8
  366. --- last-version/docs/nmbd.8    Sun Dec  3 18:50:56 1995
  367. +++ samba-1.9.15p7/docs/nmbd.8    Mon Nov 27 10:55:52 1995
  368. @@ -264,7 +264,7 @@
  369.  
  370.  The log files generated are never removed by the server.
  371.  .RE
  372. -.\" .RE
  373. +.RE
  374.  
  375.  .B -n
  376.  .I netbios name
  377. @@ -324,7 +324,7 @@
  378.  mapping of service name (eg., netbios-ns)  to service port (eg., 137) and
  379.  protocol type (eg., udp). See the section "INSTALLATION" below.
  380.  .RE
  381. -.\" .RE
  382. +.RE
  383.  
  384.  .SH ENVIRONMENT VARIABLES
  385.  Not applicable.
  386. @@ -479,8 +479,7 @@
  387.  This man page written by Karl Auer (Karl.Auer@anu.edu.au)
  388.  
  389.  See
  390. -.B smb.conf(5)
  391. -for a full list of contributors and details on how to 
  392. +.B smb.conf(5) for a full list of contributors and details on how to 
  393.  submit bug reports, comments etc.
  394.  
  395.  
  396. diff -u -r --new-file last-version/docs/security_level.txt samba-1.9.15p7/docs/security_level.txt
  397. --- last-version/docs/security_level.txt    Tue Dec  5 14:52:56 1995
  398. +++ samba-1.9.15p7/docs/security_level.txt    Thu Jan  1 10:00:00 1970
  399. @@ -1,78 +0,0 @@
  400. -Description of SMB security levels.
  401. -----------------------------------
  402. -
  403. -
  404. -A SMB server tells the client at startup what "security level" it is
  405. -running. There are two options "share level" and "user level". Which
  406. -of these two the client receives affects the way the client then tries
  407. -to authenticate itself. It does not directly affect (to any great
  408. -extent) the way the Samba server does security. I know this is
  409. -strange, but it fits in with the client/server aproach of SMB. In SMB
  410. -everything is initiated and controlled by the client, and the server
  411. -can only tell the client what is available and whether an action is
  412. -allowed. 
  413. -
  414. -I'll describe user level security first, as its simpler. In user level
  415. -security the client will send a "session setup" command directly after
  416. -the protocol negotiation. This contains a username and password. The
  417. -server can either accept or reject that username/password
  418. -combination. Note that at this stage the server has no idea what
  419. -share the client will eventually try to connect to, so it can't base
  420. -the "accept/reject" on anything other than:
  421. -
  422. -- the username/password
  423. -- the machine that the client is coming from
  424. -
  425. -If the server accepts the username/password then the client expects to
  426. -be able to mount any share (using a "tree connection") without
  427. -specifying a password. It expects that all access rights will be as
  428. -the username/password specified in the "session setup". 
  429. -
  430. -It is also possible for a client to send multiple "sesion setup"
  431. -requests. When the server responds it gives the client a "uid" to use
  432. -as an authentication tag for that username/password. The client can
  433. -maintain multiple authentication contexts in this way (WinDD is an
  434. -example of an application that does this)
  435. -
  436. -
  437. -Ok, now for share level security. In share level security (the default
  438. -with samba) the client authenticates itself separately for each
  439. -share. It will send a password along with each "tree connection"
  440. -(share mount). It does not explicitly send a username with this
  441. -operation. The client is expecting a password to be assciated with
  442. -each share, independent of the user. This means that samba has to work
  443. -out what username the client probably wants to use. It is never
  444. -explicitly sent the username. A "real" SMB server like NT actually
  445. -associates passwords directly with shares in share level security, but
  446. -samba always uses the unix authentication scheme where it is a
  447. -username/password that is authenticated, not a "share/password".
  448. -
  449. -Many clients send a "session setup" even if the server is in share
  450. -level security. They normally send a valid username but no
  451. -password. Samba records this username is a list of "possible
  452. -usernames". When the client then does a "tree connection" it also adds
  453. -to this list the name of the share they try to connect to (useful for
  454. -home directories) and any users listed in the "user =" smb.conf
  455. -line. The password is then checked in turn against these "possible
  456. -usernames". If a match is found then the client is authenticated as
  457. -that user.
  458. -
  459. -Finally "server level" security. In server level security the samba
  460. -server reports to the client that it is in user level security. The
  461. -client then does a "session setup" as described earlier. The samba
  462. -server takes the username/password that the client sends and attempts
  463. -to login to the "password server" by sending exactly the same
  464. -username/password that it got from the client. If that server is in
  465. -user level security and accepts the password then samba accepts the
  466. -clients connection. This allows the samba server to use another SMB
  467. -server as the "password server". 
  468. -
  469. -You should also note that at the very start of all this, where the
  470. -server tells the client what security level it is in, it also tells
  471. -the client if it supports encryption. If it does then it supplies the
  472. -client with a random "cryptkey". The client will then send all
  473. -passwords in encrypted form. You have to compile samba with encryption
  474. -enabled to support this feature, and you have to maintain a separate
  475. -smbpasswd file with SMB style encrypted passwords. It is
  476. -cryptographically impossible to translate from unix style encryption
  477. -to SMB style encryption.
  478. diff -u -r --new-file last-version/docs/smb.conf.5 samba-1.9.15p7/docs/smb.conf.5
  479. --- last-version/docs/smb.conf.5    Sun Dec  3 19:12:21 1995
  480. +++ samba-1.9.15p7/docs/smb.conf.5    Mon Jan 15 20:31:25 1996
  481. @@ -320,10 +320,6 @@
  482.  
  483.  auto services
  484.  
  485. -browse list
  486. -
  487. -character set
  488. -
  489.  config file
  490.  
  491.  deadtime
  492. @@ -418,10 +414,6 @@
  493.  
  494.  strip dot
  495.  
  496. -syslog
  497. -
  498. -syslog only
  499. -
  500.  time offset
  501.  
  502.  username map
  503. @@ -513,8 +505,6 @@
  504.  
  505.  max connections
  506.  
  507. -max disk size
  508. -
  509.  min print space
  510.  
  511.  only guest
  512. @@ -702,30 +692,9 @@
  513.  .B Example: 
  514.      browseable = No
  515.  
  516. -.SS browse list (G)
  517. -
  518. -This boolean determines if the server will allow the client to query
  519. -the local browse list, which holds the list of available servers in
  520. -the workgroup.
  521. -
  522. -It defaults to yes.
  523. -
  524.  .SS case sig names (G)
  525.  See "case sensitive"
  526.  
  527. -.SS character set (G)
  528. -
  529. -This option allows you to select an alternate character set for the
  530. -server, to allow for correct translation of "foreign" characters.
  531. -
  532. -Currently the only supported alternate character set is "iso8859-1"
  533. -which is probably good for sweden and maybe other nordic countries.
  534. -
  535. -The default is to use the PCs characters untranslated.
  536. -
  537. -.B Example:
  538. -    character set = iso8859-1
  539. -
  540.  .SS comment (S)
  541.  This is a text field that is seen when a client does a net view to
  542.  list what shares are available. It will also be used when browsing is
  543. @@ -1355,20 +1324,6 @@
  544.  .B Example:
  545.       mangling char = ^
  546.  
  547. -.SS max disk size (G)
  548. -
  549. -This option helps with large disks and applications that can't handle
  550. -them. You use it to pretend to the client that the disk is smaller,
  551. -but the client will still be able to use all available disk space.
  552. -
  553. -You specify the size in MB. A size of less than 1024 will fix problems
  554. -with fussy programs.
  555. -
  556. -By default the "max disk size" is 0, which means no maximum.
  557. -
  558. -.B Example:
  559. -    max disk size = 1024
  560. -
  561.  .SS max log file (G)
  562.  
  563.  This option (an integer in kilobytes) specifies the max size the log
  564. @@ -1638,8 +1593,7 @@
  565.  .B password level
  566.  is set to 1 (one), the following combinations would be tried if "FRED" failed:
  567.  "Fred", "fred", "fRed", "frEd", "freD". If
  568. -.B password level
  569. -was set to 2 (two), the following combinations would also be
  570. +.B password level was set to 2 (two), the following combinations would also be
  571.  tried: "FRed", "FrEd", "FreD", "fREd", "fReD", "frED". And so on.
  572.  
  573.  The higher value this parameter is set to the more likely it is that a mixed
  574. @@ -1693,6 +1647,10 @@
  575.  you better trust your clients, and you better restrict them with hosts
  576.  allow!
  577.  
  578. +If you list several hosts in the "password server" option then smbd
  579. +will try each in turn till it finds one that responds. This is useful
  580. +in case your primary server goes down.
  581. +
  582.  .SS path (S)
  583.  A synonym for this parameter is 'directory'.
  584.  
  585. @@ -2323,43 +2281,6 @@
  586.  
  587.  .B Example:
  588.      sync always = yes
  589. -
  590. -.SS syslog (G)
  591. -
  592. -This integer parameter is used in conjunction with
  593. -.B debug level
  594. -to filter out debugging messages destined for the system logger.
  595. -Only those debugging messages that are
  596. -.I less than or equal to
  597. -.B debug level
  598. -and
  599. -.I less than
  600. -.B syslog
  601. -are sent to the system logger.  Thus, a value of 0 can be used
  602. -to turn off system logging.
  603. -
  604. -You must compile with -DSYSLOG in order for system logging to
  605. -be enabled.
  606. -
  607. -.B Default:
  608. -    syslog = 1
  609. -
  610. -.B Example:
  611. -    syslog = 0
  612. -
  613. -.SS syslog only (G)
  614. -
  615. -This boolean controls whether debugging messages are sent to the
  616. -log file and system logger, or only to the system logger.
  617. -
  618. -You must compile with -DSYSLOG in order for system logging to
  619. -be enabled.
  620. -
  621. -.B Default:
  622. -    syslog only = False
  623. -
  624. -.B Example:
  625. -    syslog only = True
  626.  
  627.  .SS time offset (G)
  628.  This parameter is a setting in minutes to add to the normal GMT to
  629. diff -u -r --new-file last-version/docs/smbclient.1 samba-1.9.15p7/docs/smbclient.1
  630. --- last-version/docs/smbclient.1    Sun Dec  3 18:50:56 1995
  631. +++ samba-1.9.15p7/docs/smbclient.1    Mon Nov 27 10:55:54 1995
  632. @@ -50,8 +50,7 @@
  633.  an interface similar to that of the 
  634.  .B ftp
  635.  program (see
  636. -.B ftp(1)).
  637. -Operations include things like getting files from the
  638. +.B ftp(1)). Operations include things like getting files from the
  639.  server to the local machine, putting files from the local machine to
  640.  the server, retrieving directory information from the server and so on.
  641.  
  642. @@ -317,7 +316,7 @@
  643.  
  644.  The log files generated are never removed by the client.
  645.  .RE
  646. -.\" .RE
  647. +.RE
  648.  
  649.  .B -n
  650.  .I netbios name
  651. @@ -851,7 +850,7 @@
  652.  files that match the mask specified using the
  653.  .B mask
  654.  command will be retrieved. See also the
  655. -.B mask
  656. +.mask
  657.  command.
  658.  
  659.  When recursion is toggled OFF, only files from the current working
  660. @@ -937,8 +936,7 @@
  661.  
  662.  To test the client, you will need to know the name of a running Lan manager
  663.  server. It is possible to run the smbd (see
  664. -.B smbd(8))
  665. -as an ordinary user - running that server as a daemon on a
  666. +.B smbd(8)) as an ordinary user - running that server as a daemon on a
  667.  user-accessible port (typically any port number over 1024) would
  668.  provide a suitable test server.
  669.  .SH VERSION
  670. @@ -978,6 +976,5 @@
  671.  This man page written by Karl Auer (Karl.Auer@anu.edu.au)
  672.  
  673.  See
  674. -.B smb.conf(5)
  675. -for a full list of contributors and details on how to 
  676. +.B smb.conf(5) for a full list of contributors and details on how to 
  677.  submit bug reports, comments etc.
  678. diff -u -r --new-file last-version/docs/smbd.8 samba-1.9.15p7/docs/smbd.8
  679. --- last-version/docs/smbd.8    Sun Dec  3 18:50:56 1995
  680. +++ samba-1.9.15p7/docs/smbd.8    Mon Nov 27 10:55:54 1995
  681. @@ -35,14 +35,12 @@
  682.  An extensive description of the services that the server can provide is given
  683.  in the man page for the configuration file controlling the attributes of those
  684.  services (see
  685. -.B smb.conf(5)).
  686. -This man page will not describe the services, but
  687. +.B smb.conf(5)). This man page will not describe the services, but
  688.  will concentrate on the administrative aspects of running the server.
  689.  
  690.  Please note that there are significant security implications to running this
  691.  server, and
  692. -.B smb.conf(5)
  693. -should be regarded as mandatory reading before proceeding with 
  694. +.B smb.conf(5) should be regarded as mandatory reading before proceeding with 
  695.  installation.
  696.  
  697.  A session is created whenever a client requests one. Each client gets a copy
  698. @@ -188,7 +186,7 @@
  699.  clients. See
  700.  .B smb.conf(5) for more information.
  701.  .RE
  702. -.\" .RE
  703. +.RE
  704.  
  705.  .SH LIMITATIONS
  706.  
  707. @@ -405,6 +403,5 @@
  708.  This man page written by Karl Auer (Karl.Auer@anu.edu.au)
  709.  
  710.  See
  711. -.B smb.conf(5)
  712. -for a full list of contributors and details on how to 
  713. +.B smb.conf(5) for a full list of contributors and details on how to 
  714.  submit bug reports, comments etc.
  715. diff -u -r --new-file last-version/docs/smbrun.1 samba-1.9.15p7/docs/smbrun.1
  716. --- last-version/docs/smbrun.1    Sun Dec  3 18:50:56 1995
  717. +++ samba-1.9.15p7/docs/smbrun.1    Mon Nov 27 10:55:54 1995
  718. @@ -66,6 +66,5 @@
  719.  This man page was written by Karl Auer (Karl.Auer@anu.edu.au)
  720.  
  721.  See
  722. -.B smb.conf(5)
  723. -for a full list of contributors and details of how to 
  724. +.B smb.conf(5) for a full list of contributors and details of how to 
  725.  submit bug reports, comments etc.
  726. diff -u -r --new-file last-version/docs/smbstatus.1 samba-1.9.15p7/docs/smbstatus.1
  727. --- last-version/docs/smbstatus.1    Sun Dec  3 18:50:56 1995
  728. +++ samba-1.9.15p7/docs/smbstatus.1    Mon Nov 27 10:55:54 1995
  729. @@ -48,6 +48,5 @@
  730.  .B smbd(8)
  731.  
  732.  See
  733. -.B smb.conf(5)
  734. -for a full list of contributors and details on how to 
  735. +.B smb.conf(5) for a full list of contributors and details on how to 
  736.  submit bug reports, comments etc.
  737. diff -u -r --new-file last-version/docs/testparm.1 samba-1.9.15p7/docs/testparm.1
  738. --- last-version/docs/testparm.1    Sun Dec  3 18:50:56 1995
  739. +++ samba-1.9.15p7/docs/testparm.1    Mon Nov 27 10:55:54 1995
  740. @@ -100,6 +100,5 @@
  741.  (Karl.Auer@anu.edu.au)
  742.  
  743.  See
  744. -.B samba(7)
  745. -for a full list of contributors and details on how to 
  746. +.B samba(7) for a full list of contributors and details on how to 
  747.  submit bug reports, comments etc.
  748. diff -u -r --new-file last-version/docs/testprns.1 samba-1.9.15p7/docs/testprns.1
  749. --- last-version/docs/testprns.1    Sun Dec  3 18:50:56 1995
  750. +++ samba-1.9.15p7/docs/testprns.1    Mon Nov 27 10:55:54 1995
  751. @@ -103,6 +103,5 @@
  752.  (Karl.Auer@anu.edu.au)
  753.  
  754.  See
  755. -.B samba(7)
  756. -for a full list of contributors and details of how to 
  757. +.B samba(7) for a full list of contributors and details of how to 
  758.  submit bug reports, comments etc.
  759. diff -u -r --new-file last-version/source/Makefile samba-1.9.15p7/source/Makefile
  760. --- last-version/source/Makefile    Mon Dec  4 10:50:41 1995
  761. +++ samba-1.9.15p7/source/Makefile    Mon Jan 15 19:02:02 1996
  762. @@ -34,6 +34,9 @@
  763.  # This may help with some versions of make
  764.  SHELL = /bin/sh
  765.  
  766. +# The following can be useful for compiling on multiple architectures
  767. +srcdir=.
  768. +VPATH=$(srcdir)
  769.  
  770.  # set these to where to find various files
  771.  # These can be overridden by command line switches (see smbd(8))
  772. @@ -91,7 +94,7 @@
  773.  # DES_BASE=/usr/local/libdes
  774.  # DES_FLAGS= -I$(DES_BASE)
  775.  # DES_LIB= -L$(DES_BASE) -ldes
  776. -# PASSWD_FLAGS=-DSMB_PASSWD -DSMB_PASSWD_FILE=\"$(BASEDIR)/private/smbpasswd\"
  777. +# PASSWD_FLAGS=-DSMB_PASSWD=\"$(BINDIR)/smbpasswd\" -DSMB_PASSWD_FILE=\"$(BASEDIR)/private/smbpasswd\"
  778.  
  779.  ######################################
  780.  # VTP-Support
  781. @@ -171,7 +174,7 @@
  782.  
  783.  # This is for SVR4
  784.  # Contributed by mark@scot1.ucsalf.ac.uk
  785. -# FLAGSM = -DSVR4 -DSHADOW_PWD
  786. +# FLAGSM = -DSVR4 -DSHADOW_PWD -DALLOW_CHANGE_PASSWORD
  787.  # LIBSM = -lsocket -lnsl -lc -L/usr/ucblib -lucb
  788.  
  789.  
  790. @@ -277,21 +280,23 @@
  791.  # LIBSM = -lcrypt 
  792.  
  793.  
  794. -# This is for NeXT. Note that versions of NeXT less than 3.2 
  795. -# don't properly support posix, so they may present problems
  796. -# contributed by lendecke@namu01.gwdg.de
  797. -# FLAGSM = -DNEXT -posix
  798. -# LIBSM = 
  799. -
  800. -# This is for NeXT OS 2.x
  801. -# No Posix, use 'cc' for C compiler (CC above).
  802. +# This is for NEXTSTEP Release 2.X
  803. +# No Posix.
  804.  # contributed by brad@cac.washington.edu (Brad Greer)
  805.  # FLAGSM = -DNEXT2 
  806.  # LIBSM = 
  807.  
  808. -# This is for NeXT OS 3.0
  809. -# No Posix, use 'cc' for C compiler (CC above).
  810. +# This is for NEXTSTEP Release 3.0 and greater (including OPENSTEP for Mach).
  811.  # contributed by brad@cac.washington.edu (Brad Greer)
  812. +# additional configuration by pmarcos@next.com (Paul Marcos)
  813. +# For compiling n-way fat executables, you should append the appropriat -arch 
  814. +# flags to the FLAGSM variable.  Valid flags are:
  815. +#    -arch m68k
  816. +#    -arch i386
  817. +#    -arch hppa
  818. +#    -arch sparc
  819. +# To compile 4-way fat, you would append
  820. +#    -arch m68k -arch i386 -arch hppa -arch sparc
  821.  # FLAGSM = -DNEXT3_0
  822.  # LIBSM = 
  823.  
  824. @@ -351,6 +356,12 @@
  825.  # FLAGSM = -DSCO -DSHADOW_PWD 
  826.  # LIBSM = -lsec -lsocket /usr/lib/libcrypt_i.a -lintl
  827.  
  828. +# Use this for SCO OpenServer 5 with TCB passwords (default).
  829. +# contributed by Scott Michel <scottm@intime.intime.com>
  830. +# CC     = cc -Xc
  831. +# FLAGSM = -DSCO -DSecureWare -DEVEREST -DUSE_MMAP
  832. +# LIBSM  = -lprot -lcurses -lcrypt -lsocket -lPW -lm -lx -lc_s -lc
  833. +
  834.  
  835.  # This is for intergraph. 
  836.  # contributed by cjkiick@flinx.b11.ingr.com
  837. @@ -418,6 +429,16 @@
  838.  # LIBSM =
  839.  
  840.  
  841. +# This is for SONY NEWS, NEWS-OS 4.2.x
  842. +# contributed by sky@sm.sony.co.jp (Katushi Sato)
  843. +# FLAGSM = -DNEWS42 -DKANJI=\"sjis\"
  844. +# LIBSM =
  845. +
  846. +# This is for OS/2 using EMX 0.9b
  847. +# Contributed by jasonr@pec.co.nz (Jason Rumney)
  848. +# FLAGSM = -DOS2
  849. +# LIBSM = -Zexe -lsocket
  850. +
  851.  
  852.  ######################################################################
  853.  # DON'T EDIT BELOW THIS LINE
  854. @@ -438,7 +459,7 @@
  855.  all : CHECK $(PROGS)
  856.  
  857.  CHECK :
  858. -    @$(SHELL) checkos.sh $(FLAGSM)
  859. +    @$(SHELL) $(srcdir)/checkos.sh $(FLAGSM)
  860.      @echo "Using CFLAGS = $(CFLAGS)"
  861.      @echo "Using LIBS = $(LIBS)"
  862.  
  863. @@ -458,7 +479,7 @@
  864.  
  865.  .c.o: $(INCLUDES)
  866.      @echo Compiling $*.c
  867. -    @$(CC) $(CFLAGS) -c $*.c
  868. +    @$(CC) $(CFLAGS) -c $(srcdir)/$*.c
  869.  
  870.  smbd: server.o $(SMBDOBJ)
  871.      @echo Linking smbd
  872. @@ -499,14 +520,14 @@
  873.  install: installbin installman
  874.  
  875.  installbin: all
  876. -    @$(SHELL) installbin.sh $(INSTALLPERMS) $(BASEDIR) $(BINDIR) $(LIBDIR) $(VARDIR) $(PROGS) $(SCRIPTS)
  877. +    @$(SHELL) $(srcdir)/installbin.sh $(INSTALLPERMS) $(BASEDIR) $(BINDIR) $(LIBDIR) $(VARDIR) $(PROGS) $(SCRIPTS)
  878.  
  879.  # revert to the previously installed version
  880.  revert:
  881. -    @$(SHELL) revert.sh $(BINDIR) $(PROGS) $(SCRIPTS)
  882. +    @$(SHELL) $(srcdir)/revert.sh $(BINDIR) $(PROGS) $(SCRIPTS)
  883.  
  884.  installman:
  885. -    @$(SHELL) installman.sh $(MANDIR)
  886. +    @$(SHELL) $(srcdir)/installman.sh $(MANDIR)
  887.  
  888.  clean:
  889.      rm -f core *.o *~ $(PROGS)
  890. diff -u -r --new-file last-version/source/change-log samba-1.9.15p7/source/change-log
  891. --- last-version/source/change-log    Tue Dec  5 15:52:16 1995
  892. +++ samba-1.9.15p7/source/change-log    Mon Jan 15 19:45:39 1996
  893. @@ -1729,11 +1729,36 @@
  894.      changes to stop compiler warning from Timothy Hunt <tim@fsg.com>
  895.      - fixed become_user() bug that led to incorrect permissions in
  896.      some situations.
  897. -    
  898. +    - released p6    
  899. +    - is_8_3() fix from Charles Hoch <hoch@hplcgh.hpl.hp.com>
  900. +    - nmblib bugfix from gmk@mhcnet.att.com (George Kull)
  901. +    - aix pcap fix from Jon Christiansen <jchristi@sctcorp.com>
  902. +    - added explicit sig_pipe() in server.c
  903. +    - added domain logins option (not fully implemented)
  904. +    - added HAVE_GMTOFF code
  905. +    - got rid of PM_MAXLINE    
  906. +    - minor client fix from goggi@eflir (Gar≡ar Georg Nielsen)
  907. +    - added SIGCLD_IGNORE for HPUX (from Tor Lillqvist 
  908. +    <tml@hemuli.tte.vtt.fi>)    
  909. +    - OSF/1 lpq patch from scooter@GENE.COM (Scooter Morris)
  910. +    - NeXT patches from pmarcos@next.com (Paul Marcos)
  911. +    - dstdiff patch to stop infinite loop from Erwin Authried (eauth@cso.co.at)
  912. +    - password server option can now take a list of password servers
  913. +    - patches to let samba run on OS/2 from Jason Rumney <jasonr@pec.co.nz>
  914. +    - added domain logon and logon script suport
  915. +    - SCO openserver 5 patches from Scott Michel <scottm@intime.intime.com>
  916. +    - Makefile changes from Marty Leisner <leisner@sdsp.mc.xerox.com>
  917. +    - chgpasswd changes from Roman Dumych <roman@nyxis.unibase.com>
  918. +    for SVR4
  919. +    - GUEST_SESSSETUP change from David.Chappell@mail.cc.trincoll.edu
  920.      
  921.  ==========
  922.  todo:
  923.  
  924. +reply only to own workgroup in server enum
  925. +    
  926. +patch to compile with g++ and possibly solaris c++
  927. +    
  928.  nmbd needs to keep browse list uptodate by talking to the master if it loses
  929.  an election as others may still think its a valid backup and use it to get
  930.  lists. 
  931. diff -u -r --new-file last-version/source/chgpasswd.c samba-1.9.15p7/source/chgpasswd.c
  932. --- last-version/source/chgpasswd.c    Wed Nov 29 11:34:05 1995
  933. +++ samba-1.9.15p7/source/chgpasswd.c    Mon Jan 15 19:20:28 1996
  934. @@ -39,10 +39,22 @@
  935.  static int findpty(char **slave)
  936.  {
  937.    int master;
  938. +#ifdef SVR4
  939. +  extern char *ptsname();
  940. +#else
  941.    static char line[12] = "/dev/ptyXX";
  942.    void *dirp;
  943.    char *dpname;
  944. +#endif
  945.    
  946. +#ifdef SVR4
  947. +  if ((master = open("/dev/ptmx", O_RDWR)) >= 1) {
  948. +    grantpt(master);
  949. +    unlockpt(master);
  950. +    *slave = ptsname(master);
  951. +    return (master);
  952. +  }
  953. +#else
  954.    dirp = OpenDir("/dev");
  955.    if (!dirp) return(-1);
  956.    while ((dpname = ReadDirName(dirp)) != NULL) {
  957. @@ -58,13 +70,23 @@
  958.      }
  959.    }
  960.    CloseDir(dirp);
  961. +#endif
  962.    return (-1);
  963.  }
  964.  
  965. -static int dochild(int master,char *slavedev, char *passwordprogram)
  966. +static int dochild(int master,char *slavedev, char *name, char *passwordprogram)
  967.  {
  968.    int slave;
  969.    struct termios stermios;
  970. +  struct passwd *pass = Get_Pwnam(name,True);
  971. +  int gid = pass->pw_gid;
  972. +  int uid = pass->pw_uid;
  973. +
  974. +#ifdef USE_SETRES
  975. +  setresuid(0,0,0);
  976. +#else
  977. +  setuid(0);
  978. +#endif
  979.  
  980.    /* Start new session - gets rid of controlling terminal. */
  981.    if (setsid() < 0) {
  982. @@ -74,13 +96,19 @@
  983.  
  984.    /* Open slave pty and acquire as new controlling terminal. */
  985.    if ((slave = open(slavedev, O_RDWR)) < 0) {
  986. -    DEBUG(3,("More weirdness, could not read/write to new pty\n"));
  987. +    DEBUG(3,("More weirdness, could not open %s\n", 
  988. +         slavedev));
  989.      return(False);
  990.    }
  991. +#ifdef SVR4
  992. +  ioctl(slave, I_PUSH, "ptem");
  993. +  ioctl(slave, I_PUSH, "ldterm");
  994. +#else
  995.    if (ioctl(slave,TIOCSCTTY,0) <0) {
  996.       DEBUG(3,("Error in ioctl call for slave pty\n"));
  997.       /* return(False); */
  998.    }
  999. +#endif
  1000.  
  1001.    /* Close master. */
  1002.    close(master);
  1003. @@ -116,6 +144,21 @@
  1004.      return(False);
  1005.    }
  1006.  
  1007. +  /* make us completely into the right uid */
  1008. +#ifdef USE_SETRES
  1009. +  setresgid(0,0,0);
  1010. +  setresuid(0,0,0);
  1011. +  setresgid(gid,gid,gid);
  1012. +  setresuid(uid,uid,uid);      
  1013. +#else      
  1014. +  setuid(0);
  1015. +  seteuid(0);
  1016. +  setgid(gid);
  1017. +  setegid(gid);
  1018. +  setuid(uid);
  1019. +  seteuid(uid);
  1020. +#endif
  1021. +
  1022.    /* execl() password-change application */
  1023.    if (execl("/bin/sh","sh","-c",passwordprogram,NULL) < 0) {
  1024.      DEBUG(3,("Bad status returned from %s\n",passwordprogram));
  1025. @@ -257,30 +300,12 @@
  1026.      
  1027.    } else {
  1028.      /* CHILD */
  1029. -    struct passwd *pass = Get_Pwnam(name,True);
  1030. -    int gid = pass->pw_gid;
  1031. -    int uid = pass->pw_uid;
  1032. -
  1033. -    /* make us completely into the right uid */
  1034. -#ifdef USE_SETRES
  1035. -    setresgid(0,0,0);
  1036. -    setresuid(0,0,0);
  1037. -    setresgid(gid,gid,gid);
  1038. -    setresuid(uid,uid,uid);      
  1039. -#else      
  1040. -    setuid(0);
  1041. -    seteuid(0);
  1042. -    setgid(gid);
  1043. -    setegid(gid);
  1044. -    setuid(uid);
  1045. -    seteuid(uid);
  1046. -#endif
  1047.  
  1048.      /* make sure it doesn't freeze */
  1049.      alarm(20);
  1050.  
  1051.      DEBUG(3,("Dochild for user %s (uid=%d,gid=%d)\n",name,getuid(),getgid()));
  1052. -    chstat = dochild(master, slavedev, passwordprogram);
  1053. +    chstat = dochild(master, slavedev, name, passwordprogram);
  1054.    }
  1055.    DEBUG(3,("Password change %ssuccessful for user %s\n", (chstat?"":"un"), name));
  1056.    return (chstat);
  1057. @@ -314,8 +339,13 @@
  1058.        return (False);        /* inform the user */
  1059.      }
  1060.  
  1061. +#if (defined(PASSWD_PROGRAM) && defined(PASSWD_CHAT))
  1062. +  strcpy(passwordprogram,PASSWD_PROGRAM);
  1063. +  strcpy(chatsequence,PASSWD_CHAT);
  1064. +#else
  1065.    strcpy(passwordprogram,lp_passwd_program());
  1066.    strcpy(chatsequence,lp_passwd_chat());
  1067. +#endif
  1068.  
  1069.    if (!*chatsequence) {
  1070.      DEBUG(2,("Null chat sequence - no password changing\n"));
  1071. diff -u -r --new-file last-version/source/client.c samba-1.9.15p7/source/client.c
  1072. --- last-version/source/client.c    Mon Dec  4 11:47:53 1995
  1073. +++ samba-1.9.15p7/source/client.c    Mon Jan 15 19:56:44 1996
  1074. @@ -2026,7 +2026,7 @@
  1075.    {
  1076.      struct stat st;
  1077.      if (!file_exist(lname,&st)) {
  1078. -      DEBUG(0,("%s does not exist\n"));
  1079. +      DEBUG(0,("%s does not exist\n",lname));
  1080.        return;
  1081.      }
  1082.      finfo.mtime = st.st_mtime;
  1083. @@ -2906,6 +2906,10 @@
  1084.        outbuf = (char *)malloc(BUFFER_SIZE + SAFETY_MARGIN);
  1085.      }
  1086.  
  1087. +#if AJT
  1088. +  if (strstr(service,"IPC$")) connect_as_ipc = True;
  1089. +#endif
  1090. +
  1091.    strcpy(dev,"A:");
  1092.    if (connect_as_printer)
  1093.      strcpy(dev,"LPT1:");
  1094. @@ -3457,7 +3461,8 @@
  1095.            char *sname = p;
  1096.            int type = SVAL(p,14);
  1097.            int comment_offset = IVAL(p,16) & 0xFFFF;
  1098. -          fstring typestr="";
  1099. +          fstring typestr;
  1100. +          *typestr=0;
  1101.  
  1102.            switch (type)
  1103.          {
  1104. @@ -3557,7 +3562,7 @@
  1105.    char *p;
  1106.    pstring param;
  1107.    int uLevel = 1;
  1108. -  int count = -1;
  1109. +  int count = 0;
  1110.  
  1111.    int servertype = SV_TYPE_ALL; 
  1112.  
  1113. @@ -3613,16 +3618,12 @@
  1114.        p += 26;
  1115.      }
  1116.      }
  1117. -      else
  1118. -    {
  1119. -      printf("\nThis machine does not have a browse list\n");
  1120. -    }
  1121.      }
  1122.  
  1123.    if (rparam) free(rparam);
  1124.    if (rdata) free(rdata);
  1125.  
  1126. -  return(True);
  1127. +  return(count>0);
  1128.  }
  1129.  
  1130.  
  1131. @@ -4216,7 +4217,10 @@
  1132.          sleep(1);
  1133.          browse_host(True);
  1134.        }
  1135. -      list_servers();
  1136. +      if (!list_servers()) {
  1137. +        sleep(1);
  1138. +        list_servers();
  1139. +      }
  1140.  
  1141.        send_logout();
  1142.        close_sockets();
  1143. diff -u -r --new-file last-version/source/clitar.c samba-1.9.15p7/source/clitar.c
  1144. --- last-version/source/clitar.c    Mon Dec  4 11:47:51 1995
  1145. +++ samba-1.9.15p7/source/clitar.c    Mon Jan 15 18:37:04 1996
  1146. @@ -1069,9 +1069,11 @@
  1147.    /* *must* be called with buffer ready malloc'ed */
  1148.    /* ensures path exists */
  1149.  
  1150. -  pstring partpath="", ffname;
  1151. +  pstring partpath, ffname;
  1152.    char *p=fname, *basehack;
  1153.  
  1154. +  *partpath = 0;
  1155. +
  1156.    /* fname copied to ffname so can strtok */
  1157.  
  1158.    strcpy(ffname, fname);
  1159. @@ -1300,8 +1302,10 @@
  1160.    char *q;
  1161.    fstring buf;
  1162.    pstring fname;
  1163. -  int attra[2]={0, 0};
  1164. +  int attra[2];
  1165.    int direct=1;
  1166. +
  1167. +  attra[0] = attra[1] = 0;
  1168.  
  1169.    if (!next_token(NULL,buf,NULL))
  1170.      {
  1171. diff -u -r --new-file last-version/source/includes.h samba-1.9.15p7/source/includes.h
  1172. --- last-version/source/includes.h    Tue Dec  5 13:08:46 1995
  1173. +++ samba-1.9.15p7/source/includes.h    Mon Jan 15 19:15:36 1996
  1174. @@ -1,3 +1,5 @@
  1175. +#ifndef _INCLUDES_H
  1176. +#define _INCLUDES_H
  1177.  /* 
  1178.     Unix SMB/Netbios implementation.
  1179.     Version 1.9.
  1180. @@ -89,6 +91,20 @@
  1181.  #endif
  1182.  #endif
  1183.  
  1184. +#ifdef NEWS42
  1185. +#define NO_UTIMEH
  1186. +#define NO_STRFTIME
  1187. +#define NO_UTIMBUF
  1188. +#define REPLACE_MKTIME
  1189. +#define NO_TM_NAME
  1190. +#endif
  1191. +
  1192. +#ifdef OS2
  1193. +#define NO_SYSMOUNTH
  1194. +#define NO_NETIFH
  1195. +#endif
  1196. +
  1197. +
  1198.  #if (defined(SHADOW_PWD)||defined(OSF1_ENH_SEC)||defined(SecureWare)||defined(PWDAUTH))
  1199.  #define PASSWORD_LENGTH 16
  1200.  #endif
  1201. @@ -369,6 +385,8 @@
  1202.  #include <sys/filio.h>
  1203.  #include <fcntl.h>
  1204.  #include <sys/sockio.h>
  1205. +#include <netinet/tcp.h>
  1206. +#include <stropts.h>
  1207.  #include <termios.h>
  1208.  #define SYSV
  1209.  #define USE_WAITPID
  1210. @@ -485,6 +503,7 @@
  1211.  #define USE_SETSID
  1212.  #define USE_SETRES
  1213.  #define DEFAULT_PRINTING PRINT_HPUX
  1214. +#define SIGCLD_IGNORE
  1215.  #endif
  1216.  
  1217.  
  1218. @@ -507,22 +526,6 @@
  1219.  #define USE_DIRECT
  1220.  #endif
  1221.  
  1222. -
  1223. -#ifdef NEXT
  1224. -#include <strings.h>
  1225. -#include <sys/dir.h>
  1226. -#include <dirent.h>
  1227. -#include <sys/vfs.h>
  1228. -#define bzero(b,len) memset(b,0,len)
  1229. -#include <libc.h>
  1230. -#define NOSTRDUP
  1231. -#define USE_WAITPID
  1232. -#define NO_STRFTIME
  1233. -#define USE_GETCWD
  1234. -#define WAIT3_CAST1 (union wait *)
  1235. -#endif
  1236. -
  1237. -
  1238.  #ifdef NEXT2
  1239.  #include <sys/types.h>
  1240.  #include <strings.h>
  1241. @@ -548,6 +551,10 @@
  1242.  #define NOSTRDUP
  1243.  #define USE_DIRECT
  1244.  #define mode_t int
  1245. +#define GID_TYPE int
  1246. +#define gid_t int
  1247. +#define SIGNAL_CAST (void (*)(int))
  1248. +#define WAIT3_CAST1 (union wait *)
  1249.  #endif
  1250.  
  1251.  
  1252. @@ -576,6 +583,10 @@
  1253.  #include <fcntl.h>
  1254.  #include <sys/statfs.h>
  1255.  #include <sys/stropts.h>
  1256. +#include <limits.h>
  1257. +#ifdef EVEREST
  1258. +#include <unistd.h> 
  1259. +#endif
  1260.  #ifdef NETGROUP
  1261.  #include <rpcsvc/ypclnt.h>
  1262.  #endif
  1263. @@ -585,7 +596,9 @@
  1264.  #include <prot.h>
  1265.  #define crypt bigcrypt
  1266.  #endif
  1267. -#define ftruncate(f,l) syscall(0x0a28,f,l)
  1268. +#ifndef EVEREST
  1269. + #define ftruncate(f,l) syscall(0x0a28,f,l)
  1270. +#endif 
  1271.  #define SIGNAL_CAST (void (*)(int))
  1272.  #define USE_WAITPID
  1273.  #define USE_GETCWD
  1274. @@ -593,11 +606,15 @@
  1275.  #ifdef SCO3_2_2
  1276.  #define NO_EID
  1277.  #else
  1278. +#ifndef EVEREST
  1279.  #define USE_IFREQ
  1280.  #endif
  1281. +#endif
  1282.  #define STATFS4
  1283.  #define NO_FSYNC
  1284. +#ifndef EVEREST
  1285.  #define NO_INITGROUPS
  1286. +#endif
  1287.  #define HAVE_PATHCONF
  1288.  #define NO_GETRLIMIT
  1289.  #endif
  1290. @@ -788,6 +805,34 @@
  1291.  #endif
  1292.  
  1293.  
  1294. +#ifdef NEWS42
  1295. +#include <string.h>
  1296. +#include <dirent.h>
  1297. +#include <sys/vfs.h>
  1298. +#include <sys/timeb.h>
  1299. +typedef int mode_t;
  1300. +#endif
  1301. +
  1302. +#ifdef OS2
  1303. +#include <dirent.h>
  1304. +#include <sys/statfs.h>
  1305. +#include <string.h>
  1306. +#include <limits.h>
  1307. +#define SIGNAL_CAST (void (*)())
  1308. +#define HAVE_FCNTL_LOCK 0
  1309. +#define USE_WAITPID
  1310. +#define NO_GET_BROADCAST
  1311. +#define NO_EID
  1312. +#define NO_SETGROUPS
  1313. +#define NO_INITGROUPS
  1314. +#define NO_CRYPT
  1315. +#define NO_STATFS
  1316. +#define NO_CHROOT
  1317. +#define NO_CHOWN
  1318. +#define strcasecmp stricmp
  1319. +#define strncasecmp strnicmp
  1320. +#endif
  1321. +
  1322.  
  1323.  /*******************************************************************
  1324.  end of the platform specific sections
  1325. @@ -1064,4 +1109,6 @@
  1326.  
  1327.  #define memcpy(d,s,l) memcpy_wrapped(d,s,l,__FILE__,__LINE__)
  1328.  void *memcpy_wrapped(void *d,void *s,int l,char *fname,int line);
  1329. +#endif
  1330. +
  1331.  #endif
  1332. diff -u -r --new-file last-version/source/ipc.c samba-1.9.15p7/source/ipc.c
  1333. --- last-version/source/ipc.c    Sun Dec  3 00:17:42 1995
  1334. +++ samba-1.9.15p7/source/ipc.c    Mon Jan 15 16:24:54 1996
  1335. @@ -794,8 +794,6 @@
  1336.      if (!next_token(&ptr,s->comment,NULL)) continue;
  1337.      if (sscanf(stype,"%X",&s->type) != 1) continue;
  1338.  
  1339. -    if (!s->type) s->type = SV_TYPE_SERVER;
  1340. -
  1341.      if (!(servertype & s->type) || 
  1342.      ((s->type&SV_TYPE_DOMAIN_ENUM) && 
  1343.       !(servertype&SV_TYPE_DOMAIN_ENUM))) continue;
  1344. @@ -1861,13 +1859,12 @@
  1345.    char *str1 = param+2;
  1346.    char *str2 = skip_string(str1,1);
  1347.    char *p = skip_string(str2,1);
  1348. -  int uLevel,cbBuf;
  1349. +  int uLevel;
  1350.    struct pack_desc desc;
  1351.    char* name;
  1352.  
  1353.    uLevel = SVAL(p,0);
  1354. -  cbBuf = SVAL(p,2);
  1355. -  name = p + 4;
  1356. +  name = p + 2;
  1357.  
  1358.    bzero(&desc,sizeof(desc));
  1359.  
  1360. @@ -1887,19 +1884,25 @@
  1361.      PACKS(&desc,"B21",name);    /* eff. name */
  1362.      PACKS(&desc,"B","");        /* pad */
  1363.      PACKI(&desc,"W",2);        /* priv */
  1364. -    PACKI(&desc,"D",0);        /* auth flags */
  1365. +    PACKI(&desc,"D",0);        /* auth flags XXX */
  1366.      PACKI(&desc,"W",0);        /* num logons */
  1367.      PACKI(&desc,"W",0);        /* bad pw count */
  1368. -    PACKI(&desc,"D",0);        /* last logon */
  1369. -    PACKI(&desc,"D",0);        /* last logoff */
  1370. +    PACKI(&desc,"D",-1);        /* last logon */
  1371. +    PACKI(&desc,"D",-1);        /* last logoff */
  1372.      PACKI(&desc,"D",-1);        /* logoff time */
  1373.      PACKI(&desc,"D",-1);        /* kickoff time */
  1374.      PACKI(&desc,"D",0);        /* password age */
  1375.      PACKI(&desc,"D",0);        /* password can change */
  1376.      PACKI(&desc,"D",-1);        /* password must change */
  1377. -    PACKS(&desc,"z",local_machine);/* computer */
  1378. +    {
  1379. +      fstring mypath;
  1380. +      strcpy(mypath,"\\\\");
  1381. +      strcat(mypath,local_machine);
  1382. +      strupper(mypath);
  1383. +      PACKS(&desc,"z",mypath); /* computer */
  1384. +    }
  1385.      PACKS(&desc,"z",my_workgroup());/* domain */
  1386. -    PACKS(&desc,"z","");        /* script path */
  1387. +    PACKS(&desc,"z",lp_logon_script());        /* script path */
  1388.      PACKI(&desc,"D",0);        /* reserved */
  1389.    }
  1390.  
  1391. diff -u -r --new-file last-version/source/loadparm.c samba-1.9.15p7/source/loadparm.c
  1392. --- last-version/source/loadparm.c    Tue Dec  5 15:05:25 1995
  1393. +++ samba-1.9.15p7/source/loadparm.c    Mon Jan 15 19:11:08 1996
  1394. @@ -131,6 +131,7 @@
  1395.     char *szDomainController;
  1396.     char *szUsernameMap;
  1397.     char *szCharacterSet;
  1398. +   char *szLogonScript;
  1399.     int max_log_size;
  1400.     int mangled_stack;
  1401.     int max_xmit;
  1402. @@ -148,6 +149,7 @@
  1403.     int max_ttl;
  1404.     BOOL bPreferredMaster;
  1405.     BOOL bDomainMaster;
  1406. +   BOOL bDomainLogons;
  1407.     BOOL bEncryptPasswords;
  1408.     BOOL bStripDot;
  1409.     BOOL bNullPasswords;
  1410. @@ -389,6 +391,7 @@
  1411.    {"domain controller",P_STRING,  P_GLOBAL, &Globals.szDomainController,NULL},
  1412.    {"username map",     P_STRING,  P_GLOBAL, &Globals.szUsernameMap,     NULL},
  1413.    {"character set",    P_STRING,  P_GLOBAL, &Globals.szCharacterSet,    handle_character_set},
  1414. +  {"logon script",     P_STRING,  P_GLOBAL, &Globals.szLogonScript,     NULL},
  1415.    {"max log size",     P_INTEGER, P_GLOBAL, &Globals.max_log_size,      NULL},
  1416.    {"mangled stack",    P_INTEGER, P_GLOBAL, &Globals.mangled_stack,     NULL},
  1417.    {"max mux",          P_INTEGER, P_GLOBAL, &Globals.max_mux,           NULL},
  1418. @@ -408,6 +411,7 @@
  1419.    {"preferred master", P_BOOL,    P_GLOBAL, &Globals.bPreferredMaster,  NULL},
  1420.    {"prefered master",  P_BOOL,    P_GLOBAL, &Globals.bPreferredMaster,  NULL},
  1421.    {"domain master",    P_BOOL,    P_GLOBAL, &Globals.bDomainMaster,     NULL},
  1422. +  {"domain logons",    P_BOOL,    P_GLOBAL, &Globals.bDomainLogons,     NULL},
  1423.    {"browse list",      P_BOOL,    P_GLOBAL, &Globals.bBrowseList,       NULL},
  1424.  
  1425.    {"-valid",           P_BOOL,    P_LOCAL,  &sDefault.valid,            NULL},
  1426. @@ -526,7 +530,11 @@
  1427.  #endif
  1428.    string_set(&Globals.szPasswdChat,"*old*password* %o\\n *new*password* %n\\n *new*password* %n\\n *changed*");
  1429.    string_set(&Globals.szWorkGroup, WORKGROUP);
  1430. +#ifdef SMB_PASSWD
  1431. +  string_set(&Globals.szPasswdProgram, SMB_PASSWD);
  1432. +#else
  1433.    string_set(&Globals.szPasswdProgram, "/bin/passwd");
  1434. +#endif
  1435.    string_set(&Globals.szPrintcapname, PRINTCAP_NAME);
  1436.    string_set(&Globals.szLockDir, LOCKDIR);
  1437.    string_set(&Globals.szRootdir, "/");
  1438. @@ -558,6 +566,7 @@
  1439.    Globals.max_ttl = 60*60*4; /* 2 hours default */
  1440.    Globals.bPreferredMaster = True;
  1441.    Globals.bDomainMaster = False;
  1442. +  Globals.bDomainLogons = False;
  1443.    Globals.bBrowseList = True;
  1444.  
  1445.  #ifdef KANJI
  1446. @@ -675,8 +684,10 @@
  1447.  FN_GLOBAL_STRING(lp_domain_controller,&Globals.szDomainController)
  1448.  FN_GLOBAL_STRING(lp_username_map,&Globals.szUsernameMap)
  1449.  FN_GLOBAL_STRING(lp_character_set,&Globals.szCharacterSet) 
  1450. +FN_GLOBAL_STRING(lp_logon_script,&Globals.szLogonScript) 
  1451.  
  1452.  FN_GLOBAL_BOOL(lp_domain_master,&Globals.bDomainMaster)
  1453. +FN_GLOBAL_BOOL(lp_domain_logons,&Globals.bDomainLogons)
  1454.  FN_GLOBAL_BOOL(lp_preferred_master,&Globals.bPreferredMaster)
  1455.  FN_GLOBAL_BOOL(lp_load_printers,&Globals.bLoadPrinters)
  1456.  FN_GLOBAL_BOOL(lp_use_rhosts,&Globals.bUseRhosts)
  1457. diff -u -r --new-file last-version/source/loadparm.h samba-1.9.15p7/source/loadparm.h
  1458. --- last-version/source/loadparm.h    Sun Dec  3 00:17:16 1995
  1459. +++ samba-1.9.15p7/source/loadparm.h    Mon Jan 15 19:57:14 1996
  1460. @@ -54,6 +54,7 @@
  1461.  extern char *lp_domain_controller(void);
  1462.  extern char *lp_username_map(void);
  1463.  extern char *lp_hosts_equiv(void);
  1464. +extern char *lp_logon_script(void);
  1465.  extern char *lp_magicscript(int iService);
  1466.  extern char *lp_magicoutput(int iService);
  1467.  extern char *lp_mangled_map(int iService);
  1468. @@ -66,6 +67,7 @@
  1469.  extern int  lp_mangledstack(void);
  1470.  extern BOOL lp_preferred_master(void);
  1471.  extern BOOL lp_domain_master(void);
  1472. +extern BOOL lp_domain_logons(void);
  1473.  extern BOOL lp_getwdcache(void);
  1474.  extern BOOL lp_use_rhosts(void);
  1475.  extern BOOL lp_readprediction(void);
  1476. @@ -155,3 +157,4 @@
  1477.  char *my_workgroup(void);
  1478.  
  1479.  #endif
  1480. +
  1481. diff -u -r --new-file last-version/source/mangle.c samba-1.9.15p7/source/mangle.c
  1482. --- last-version/source/mangle.c    Sun Dec  3 19:29:18 1995
  1483. +++ samba-1.9.15p7/source/mangle.c    Thu Dec  7 10:23:53 1995
  1484. @@ -82,12 +82,13 @@
  1485.  ****************************************************************************/
  1486.  BOOL is_8_3(char *fname)
  1487.  {
  1488. -  int len = strlen(fname);
  1489. +  int len;
  1490.    char *dot_pos;
  1491.    char *slash_pos = strrchr(fname,'/');
  1492.    int l;
  1493.  
  1494.    if (slash_pos) fname = slash_pos+1;
  1495. +  len = strlen(fname);
  1496.  
  1497.    dot_pos = strchr(fname,'.');
  1498.  
  1499. diff -u -r --new-file last-version/source/nameserv.c samba-1.9.15p7/source/nameserv.c
  1500. --- last-version/source/nameserv.c    Mon Dec  4 11:48:17 1995
  1501. +++ samba-1.9.15p7/source/nameserv.c    Mon Jan 15 18:38:56 1996
  1502. @@ -48,8 +48,8 @@
  1503.  static pstring host_file;
  1504.  static pstring myname="";
  1505.  
  1506. -static int ClientNMB=-1;
  1507. -static int ClientDGRAM=-1;
  1508. +static int ClientNMB= -1;
  1509. +static int ClientDGRAM= -1;
  1510.  
  1511.  static BOOL needannounce=True;
  1512.  
  1513. @@ -110,6 +110,8 @@
  1514.  
  1515.  #define GET_TTL(ttl) ((ttl)?MIN(ttl,lp_max_ttl()):lp_max_ttl())
  1516.  
  1517. +#define BROWSE_MAILSLOT "\\MAILSLOT\\BROWSE"
  1518. +
  1519.  /****************************************************************************
  1520.  catch a sighup
  1521.  ****************************************************************************/
  1522. @@ -154,7 +156,7 @@
  1523.    if ((p=strrchr(dname,'/'))) *p=0;
  1524.    strcat(dname,"/corefiles");
  1525.    mkdir(dname,0700);
  1526. -  chown(dname,getuid(),getgid());
  1527. +  sys_chown(dname,getuid(),getgid());
  1528.    chmod(dname,0700);
  1529.    if (chdir(dname)) return(False);
  1530.    umask(~(0700));
  1531. @@ -451,7 +453,9 @@
  1532.    **************************************************************************/
  1533.  static void add_my_names(void)
  1534.  {
  1535. -  struct in_addr ip = *interpret_addr2("0.0.0.0");
  1536. +  struct in_addr ip;
  1537. +
  1538. +  ip = *interpret_addr2("0.0.0.0");
  1539.  
  1540.    add_host_entry(myname,0x20,True,0,SELF,ip);
  1541.    add_host_entry(myname,0x0,True,0,SELF,ip);
  1542. @@ -652,12 +656,14 @@
  1543.  
  1544.        {
  1545.      BOOL group=False;
  1546. -    string ip="",name="",flags="",extra="";
  1547. +    string ip,name,flags,extra;
  1548.      char *ptr;
  1549.      int count = 0;
  1550.      struct in_addr ipaddr;
  1551.      enum name_source source = LMHOSTS;
  1552.  
  1553. +    *ip = *name = *flags = *extra = 0;
  1554. +
  1555.      ptr = line;
  1556.  
  1557.      if (next_token(&ptr,ip,NULL)) ++count;
  1558. @@ -733,8 +739,8 @@
  1559.    strupper(p);
  1560.    p = skip_string(p,1);
  1561.  
  1562. -  send_udp_dgram(ClientDGRAM,outbuf,PTR_DIFF(p,outbuf),
  1563. -         name,group,0,0x1e,bcast_ip,myip);
  1564. +  send_mailslot_reply(BROWSE_MAILSLOT,ClientDGRAM,outbuf,PTR_DIFF(p,outbuf),
  1565. +              name,group,0,0x1e,bcast_ip,myip);
  1566.  }
  1567.  
  1568.  
  1569. @@ -762,8 +768,8 @@
  1570.    strupper(p);
  1571.    p = skip_string(p,1) + 1;
  1572.  
  1573. -  send_udp_dgram(ClientDGRAM,outbuf,PTR_DIFF(p,outbuf),
  1574. -         myname,to->name,0,to->name_type,ip,myip);
  1575. +  send_mailslot_reply(BROWSE_MAILSLOT,ClientDGRAM,outbuf,PTR_DIFF(p,outbuf),
  1576. +              myname,to->name,0,to->name_type,ip,myip);
  1577.  }
  1578.  
  1579.  
  1580. @@ -788,13 +794,11 @@
  1581.      add_host_entry(PrimaryGroup,0x1b,True,0,SELF,myip);
  1582.      add_host_entry(PrimaryGroup,0x1c,False,0,SELF,myip);
  1583.      ServerType |= SV_TYPE_DOMAIN_MASTER;
  1584. -#if 0
  1585. -    ServerType |= SV_TYPE_DOMAIN_CTRL;
  1586. -    ServerType |= SV_TYPE_DOMAIN_MEMBER;
  1587. -    ServerType |= 0xFFFFFF;
  1588. -    domain_type |= SV_TYPE_DOMAIN_CTRL;
  1589. -    domain_type |= 0xFFFFFF;
  1590. -#endif
  1591. +    if (lp_domain_logons()) {
  1592. +      ServerType |= SV_TYPE_DOMAIN_CTRL;
  1593. +      ServerType |= SV_TYPE_DOMAIN_MEMBER;
  1594. +      domain_type |= SV_TYPE_DOMAIN_CTRL;
  1595. +    }
  1596.    }
  1597.  
  1598.    add_server_entry(PrimaryGroup,domain_type,0,myname,True);
  1599. @@ -817,6 +821,7 @@
  1600.    DEBUG(2,("Becoming non-master for %s\n",PrimaryGroup));
  1601.  
  1602.    ServerType &= ~SV_TYPE_MASTER_BROWSER;
  1603. +  ServerType &= ~SV_TYPE_DOMAIN_CTRL;
  1604.    ServerType &= ~SV_TYPE_DOMAIN_MASTER;
  1605.  
  1606.    ElectionCriterion &= ~0x4;
  1607. @@ -925,8 +930,8 @@
  1608.    p += 31;
  1609.    p = skip_string(p,1);
  1610.  
  1611. -  send_udp_dgram(ClientDGRAM,outbuf,PTR_DIFF(p,outbuf),
  1612. -         my_name,d->name,0,0x1d,d->bcast_ip,myip);
  1613. +  send_mailslot_reply(BROWSE_MAILSLOT,ClientDGRAM,outbuf,PTR_DIFF(p,outbuf),
  1614. +              my_name,d->name,0,0x1d,d->bcast_ip,myip);
  1615.  
  1616.    /* if I'm the master then I also need to do a local master and
  1617.       domain announcement */
  1618. @@ -939,8 +944,8 @@
  1619.      SIVAL(stypep,0,ServerType);
  1620.  
  1621.      CVAL(outbuf,0) = 15; /* local master announce */
  1622. -    send_udp_dgram(ClientDGRAM,outbuf,PTR_DIFF(p,outbuf),
  1623. -           my_name,PrimaryGroup,0,0x1e,d->bcast_ip,myip);
  1624. +    send_mailslot_reply(BROWSE_MAILSLOT,ClientDGRAM,outbuf,PTR_DIFF(p,outbuf),
  1625. +            my_name,PrimaryGroup,0,0x1e,d->bcast_ip,myip);
  1626.  
  1627.      CVAL(outbuf,0) = 12; /* domain announce */
  1628.      StrnCpy(namep,PrimaryGroup,15);
  1629. @@ -950,8 +955,8 @@
  1630.      SIVAL(stypep,0,(unsigned)0x80000000);
  1631.      p = commentp + strlen(commentp) + 1;
  1632.  
  1633. -    send_udp_dgram(ClientDGRAM,outbuf,PTR_DIFF(p,outbuf),
  1634. -           my_name,MSBROWSE,0,1,d->bcast_ip,myip);
  1635. +    send_mailslot_reply(BROWSE_MAILSLOT,ClientDGRAM,outbuf,PTR_DIFF(p,outbuf),
  1636. +            my_name,MSBROWSE,0,1,d->bcast_ip,myip);
  1637.    }
  1638.  }
  1639.  
  1640. @@ -978,8 +983,8 @@
  1641.    strupper(p);
  1642.    p = skip_string(p,1);
  1643.  
  1644. -  send_udp_dgram(ClientDGRAM,outbuf,PTR_DIFF(p,outbuf),
  1645. -         myname,group,0,0,bcast_ip,myip);
  1646. +  send_mailslot_reply(BROWSE_MAILSLOT,ClientDGRAM,outbuf,PTR_DIFF(p,outbuf),
  1647. +              myname,group,0,0,bcast_ip,myip);
  1648.  }
  1649.  
  1650.  /****************************************************************************
  1651. @@ -992,7 +997,8 @@
  1652.    pstring outbuf;
  1653.    char *p;
  1654.    struct in_addr ip,pdc_ip;
  1655. -  fstring pdcname="";
  1656. +  fstring pdcname;
  1657. +  *pdcname = 0;
  1658.  
  1659.    if (!AM_MASTER || (last && (t-last < 10*60))) return;
  1660.    last = t;
  1661. @@ -1029,8 +1035,8 @@
  1662.    strupper(p);
  1663.    p = skip_string(p,1);
  1664.  
  1665. -  send_udp_dgram(ClientDGRAM,outbuf,PTR_DIFF(p,outbuf),
  1666. -         PrimaryGroup,myname,0x1b,0,pdc_ip,myip);
  1667. +  send_mailslot_reply(BROWSE_MAILSLOT,ClientDGRAM,outbuf,PTR_DIFF(p,outbuf),
  1668. +              PrimaryGroup,myname,0x1b,0,pdc_ip,myip);
  1669.  }
  1670.  
  1671.  
  1672. @@ -1278,6 +1284,78 @@
  1673.  
  1674.  
  1675.  /****************************************************************************
  1676. +  process a domain logon packet
  1677. +  **************************************************************************/
  1678. +static void process_logon_packet(struct packet_struct *p,char *buf,int len)
  1679. +{
  1680. +  char *logname,*q;
  1681. +  char *reply_name;
  1682. +  BOOL add_slashes = False;
  1683. +  pstring outbuf;
  1684. +  struct dgram_packet *dgram = &p->packet.dgram;
  1685. +  int code,reply_code;
  1686. +
  1687. +  if (!lp_domain_logons()) {
  1688. +    DEBUG(3,("No domain logons\n"));
  1689. +    return;
  1690. +  }
  1691. +  if (!listening(&dgram->dest_name)) {
  1692. +    DEBUG(4,("Not listening to that domain\n"));
  1693. +    return;
  1694. +  }
  1695. +
  1696. +  code = SVAL(buf,0);
  1697. +  switch (code) {
  1698. +  case 0:    
  1699. +    {
  1700. +      char *machine = buf+2;
  1701. +      char *user = skip_string(machine,1);
  1702. +      logname = skip_string(user,1);
  1703. +      reply_code = 6;
  1704. +      reply_name = myname;
  1705. +      add_slashes = True;
  1706. +      DEBUG(3,("Domain login request from %s(%s) user=%s\n",
  1707. +           machine,inet_ntoa(p->ip),user));
  1708. +    }
  1709. +    break;
  1710. +  case 7:    
  1711. +    {
  1712. +      char *machine = buf+2;
  1713. +      logname = skip_string(machine,1);
  1714. +      reply_code = 7;
  1715. +      reply_name = lp_domain_controller();
  1716. +      if (!*reply_name) {
  1717. +    DEBUG(3,("No domain controller configured\n"));
  1718. +    return;
  1719. +      }
  1720. +      DEBUG(3,("GETDC request from %s(%s)\n",
  1721. +           machine,inet_ntoa(p->ip)));
  1722. +    }
  1723. +    break;
  1724. +  default:
  1725. +    DEBUG(3,("Unknown domain request %d\n",code));
  1726. +    return;
  1727. +  }
  1728. +
  1729. +  bzero(outbuf,sizeof(outbuf));
  1730. +  q = outbuf;
  1731. +  SSVAL(q,0,reply_code);
  1732. +  q += 2;
  1733. +  if (add_slashes) {
  1734. +    strcpy(q,"\\\\");
  1735. +    q += 2;
  1736. +  }
  1737. +  StrnCpy(q,reply_name,16);
  1738. +  strupper(q);
  1739. +  q = skip_string(q,1);
  1740. +  SSVAL(q,0,0xFFFF);
  1741. +  q += 2;
  1742. +
  1743. +  send_mailslot_reply(logname,ClientDGRAM,outbuf,PTR_DIFF(q,outbuf),
  1744. +              myname,&dgram->source_name.name[0],0,0,p->ip,myip);  
  1745. +}
  1746. +
  1747. +/****************************************************************************
  1748.  process udp 138 datagrams
  1749.  ****************************************************************************/
  1750.  static void process_dgram(struct packet_struct *p)
  1751. @@ -1307,12 +1385,14 @@
  1752.         namestr(&dgram->source_name),namestr(&dgram->dest_name),
  1753.         smb_buf(buf),CVAL(buf2,0),len));
  1754.  
  1755. -  /* only understand browse datagrams */
  1756. -  if (!strequal(smb_buf(buf),"\\MAILSLOT\\BROWSE"))
  1757. -    return;
  1758. -
  1759.    if (len <= 0) return;
  1760. -  process_browse_packet(p,buf2,len);
  1761. +
  1762. +  if (strequal(smb_buf(buf),"\\MAILSLOT\\BROWSE")) {
  1763. +    process_browse_packet(p,buf2,len);
  1764. +  } else if (strequal(smb_buf(buf),"\\MAILSLOT\\NET\\NETLOGON")) {
  1765. +    process_logon_packet(p,buf2,len);
  1766. +  }
  1767. +
  1768.  }
  1769.  
  1770.  /*******************************************************************
  1771. @@ -2054,6 +2134,7 @@
  1772.    printf("\t-B broadcast address  the address to use for broadcasts\n");
  1773.    printf("\t-N netmask           the netmask to use for subnet determination\n");
  1774.    printf("\t-H hosts file        load a netbios hosts file\n");
  1775. +  printf("\t-I ip-address        override the IP address\n");
  1776.    printf("\t-G group name        add a group name to be part of\n");
  1777.    printf("\t-C comment           sets the machine comment that appears in browse lists\n");
  1778.    printf("\n");
  1779. diff -u -r --new-file last-version/source/nameserv.h samba-1.9.15p7/source/nameserv.h
  1780. --- last-version/source/nameserv.h    Wed Nov 22 18:32:05 1995
  1781. +++ samba-1.9.15p7/source/nameserv.h    Mon Jan 15 13:59:59 1996
  1782. @@ -176,9 +176,9 @@
  1783.  BOOL name_status(int fd,char *name,int name_type,BOOL recurse,
  1784.           struct in_addr to_ip,char *master,char *rname,
  1785.           void (*fn)());
  1786. -BOOL send_udp_dgram(int fd,char *buf,int len,
  1787. -               char *srcname,char *dstname,
  1788. -               int src_type,int dest_type,
  1789. -               struct in_addr dest_ip,
  1790. -               struct in_addr src_ip);
  1791. +BOOL send_mailslot_reply(char *mailslot,int fd,char *buf,int len,
  1792. +             char *srcname,char *dstname,
  1793. +             int src_type,int dest_type,
  1794. +             struct in_addr dest_ip,
  1795. +             struct in_addr src_ip);
  1796.  char *namestr(struct nmb_name *n);
  1797. diff -u -r --new-file last-version/source/nmblib.c samba-1.9.15p7/source/nmblib.c
  1798. --- last-version/source/nmblib.c    Mon Dec  4 16:51:42 1995
  1799. +++ samba-1.9.15p7/source/nmblib.c    Mon Jan 15 18:39:22 1996
  1800. @@ -365,7 +365,8 @@
  1801.    ******************************************************************/
  1802.  void free_packet(struct packet_struct *packet)
  1803.  {  
  1804. -  free_nmb_packet(&packet->packet.nmb);
  1805. +  if (packet->packet_type == NMB_PACKET)
  1806. +    free_nmb_packet(&packet->packet.nmb);
  1807.    free(packet);
  1808.  }
  1809.  
  1810. @@ -623,7 +624,8 @@
  1811.      {
  1812.        char qname[17];
  1813.        int type;
  1814. -      fstring flags="";
  1815. +      fstring flags;
  1816. +      *flags = 0;
  1817.        StrnCpy(qname,p,15);
  1818.        type = CVAL(p,15);
  1819.        p += 16;
  1820. @@ -871,11 +873,11 @@
  1821.    Note that this currently sends all answers to port 138. thats the
  1822.    wrong things to do! I should send to the requestors port. XXX
  1823.    **************************************************************************/
  1824. -BOOL send_udp_dgram(int fd,char *buf,int len,
  1825. -               char *srcname,char *dstname,
  1826. -               int src_type,int dest_type,
  1827. -               struct in_addr dest_ip,
  1828. -               struct in_addr src_ip)
  1829. +BOOL send_mailslot_reply(char *mailslot,int fd,char *buf,int len,
  1830. +             char *srcname,char *dstname,
  1831. +             int src_type,int dest_type,
  1832. +             struct in_addr dest_ip,
  1833. +             struct in_addr src_ip)
  1834.  {
  1835.    struct packet_struct p;
  1836.    struct dgram_packet *dgram = &p.packet.dgram;
  1837. @@ -908,13 +910,13 @@
  1838.    CVAL(ptr,smb_com) = SMBtrans;
  1839.    SSVAL(ptr,smb_vwv1,len);
  1840.    SSVAL(ptr,smb_vwv11,len);
  1841. -  SSVAL(ptr,smb_vwv12,86);
  1842. +  SSVAL(ptr,smb_vwv12,70 + strlen(mailslot));
  1843.    SSVAL(ptr,smb_vwv13,3);
  1844.    SSVAL(ptr,smb_vwv14,1);
  1845.    SSVAL(ptr,smb_vwv15,1);
  1846.    SSVAL(ptr,smb_vwv16,2);
  1847.    p2 = smb_buf(ptr);
  1848. -  strcpy(p2,"\\MAILSLOT\\BROWSE");
  1849. +  strcpy(p2,mailslot);
  1850.    p2 = skip_string(p2,1);
  1851.  
  1852.    memcpy(p2,buf,len);
  1853. diff -u -r --new-file last-version/source/params.c samba-1.9.15p7/source/params.c
  1854. --- last-version/source/params.c    Thu Jul  6 17:27:20 1995
  1855. +++ samba-1.9.15p7/source/params.c    Mon Jan  8 12:21:23 1996
  1856. @@ -81,7 +81,7 @@
  1857.  **************************************************************************/
  1858.  static BOOL enumerate_parameters(FILE *fileIn, PM_PARMFUNC pfunc)
  1859.  {
  1860. -   char szBuf[PM_MAXLINE + 1];
  1861. +   pstring szBuf;
  1862.     char *pszTemp;
  1863.     BOOL bRetval;
  1864.     long lFileOffset;
  1865. @@ -96,7 +96,7 @@
  1866.        if ((lFileOffset = ftell(fileIn)) >= 0L)
  1867.        {
  1868.       /* then get and check a line */
  1869. -     if (fgets_slash(szBuf, PM_MAXLINE, fileIn) == NULL)
  1870. +     if (fgets_slash(szBuf, sizeof(szBuf)-1, fileIn) == NULL)
  1871.       {
  1872.          /* stop - return OK unless file error */
  1873.          bRetval = !ferror(fileIn);
  1874. @@ -189,7 +189,7 @@
  1875.  static BOOL enumerate_sections(FILE *fileIn, 
  1876.                     PM_SECFUNC sfunc, PM_PARMFUNC pfunc)
  1877.  {
  1878. -   char szBuf[PM_MAXLINE + 1];
  1879. +   pstring szBuf;
  1880.     BOOL bRetval;
  1881.     BOOL bSectionFound;
  1882.  
  1883. @@ -200,7 +200,7 @@
  1884.     bSectionFound = False;
  1885.     while (True)
  1886.     {
  1887. -      if (fgets_slash(szBuf, PM_MAXLINE, fileIn) == NULL)
  1888. +      if (fgets_slash(szBuf, sizeof(szBuf)-1, fileIn) == NULL)
  1889.        {
  1890.       /* stop - return OK unless file error */
  1891.       bRetval = !ferror(fileIn);
  1892. diff -u -r --new-file last-version/source/params.h samba-1.9.15p7/source/params.h
  1893. --- last-version/source/params.h    Thu Jun 29 18:13:37 1995
  1894. +++ samba-1.9.15p7/source/params.h    Mon Jan  8 12:20:35 1996
  1895. @@ -35,8 +35,6 @@
  1896.  typedef BOOL (* PM_PARMFUNC)(char *pszParmName, char *pszParmValue);
  1897.  typedef BOOL (* PM_SECFUNC)(char *pszSectionName);
  1898.  
  1899. -#define PM_MAXLINE              512
  1900. -
  1901.  #define PM_NOFILE               1
  1902.  #define PM_NOFILENAME           2
  1903.  #define PM_FILEERROR            3
  1904. diff -u -r --new-file last-version/source/password.c samba-1.9.15p7/source/password.c
  1905. --- last-version/source/password.c    Sun Dec  3 19:27:35 1995
  1906. +++ samba-1.9.15p7/source/password.c    Mon Jan 15 13:04:50 1996
  1907. @@ -546,7 +546,12 @@
  1908.    return(linux_bigcrypt(password,this_salt,this_crypted));
  1909.  #endif
  1910.  
  1911. +#ifdef NO_CRYPT
  1912. +  DEBUG(1,("Warning - no crypt available\n"));
  1913. +  return(False);
  1914. +#else
  1915.    return(strcmp((char *)crypt(password,this_salt),this_crypted) == 0);
  1916. +#endif
  1917.  }
  1918.  
  1919.  #ifdef SMB_PASSWD
  1920. @@ -711,7 +716,14 @@
  1921.  
  1922.  #ifdef SHADOW_PWD
  1923.    {
  1924. -    struct spwd *spass = getspnam(pass->pw_name);
  1925. +    struct spwd *spass;
  1926. +
  1927. +    /* many shadow systems require you to be root to get the password,
  1928. +       in most cases this should already be the case when this
  1929. +       function is called, except perhaps for IPC password changing
  1930. +       requests */
  1931. +
  1932. +    spass = getspnam(pass->pw_name);
  1933.      if (spass && spass->sp_pwdp)
  1934.        pass->pw_passwd = spass->sp_pwdp;
  1935.    }
  1936. @@ -1223,6 +1235,7 @@
  1937.  
  1938.  
  1939.  static int password_client = -1;
  1940. +static fstring pserver;
  1941.  
  1942.  /****************************************************************************
  1943.  attempted support for server level security 
  1944. @@ -1238,13 +1251,11 @@
  1945.    struct in_addr dest_ip;
  1946.    extern struct in_addr myip;
  1947.    int port = 139;
  1948. -  char *pserver = lp_passwordserver();
  1949.    BOOL ret;
  1950.  
  1951. -  if (password_client >= 0) {
  1952. +  if (password_client >= 0)
  1953.      close(password_client);
  1954. -    password_client= -1;
  1955. -  }
  1956. +  password_client = -1;
  1957.  
  1958.    if (Protocol < PROTOCOL_NT1) {
  1959.      strcpy(pass_protocol,"LM1.2X002");
  1960. @@ -1255,28 +1266,35 @@
  1961.    bzero(inbuf,sizeof(inbuf));
  1962.    bzero(outbuf,sizeof(outbuf));
  1963.  
  1964. -  strcpy(desthost,pserver);
  1965. -  standard_sub_basic(desthost);
  1966. -  strupper(desthost);
  1967. -
  1968. -  dest_ip = *interpret_addr2(desthost);
  1969. -  if (zero_ip(dest_ip)) {
  1970. -    DEBUG(1,("Can't find password server\n"));
  1971. -    return(False);
  1972. -  }
  1973. -
  1974. -  if (memcmp(&dest_ip,&myip,sizeof(dest_ip)) == 0) {
  1975. -    DEBUG(1,("Password server loop - disabling password server\n"));
  1976. -    return(False);
  1977. +  for (p=strtok(lp_passwordserver(),LIST_SEP); p ; p = strtok(NULL,LIST_SEP)) {
  1978. +    strcpy(desthost,p);
  1979. +    standard_sub_basic(desthost);
  1980. +    strupper(desthost);
  1981. +
  1982. +    dest_ip = *interpret_addr2(desthost);
  1983. +    if (zero_ip(dest_ip)) {
  1984. +      DEBUG(1,("Can't resolve address for %s\n",p));
  1985. +      continue;
  1986. +    }
  1987. +
  1988. +    if (memcmp(&dest_ip,&myip,sizeof(dest_ip)) == 0) {
  1989. +      DEBUG(1,("Password server loop - disabling password server %s\n",p));
  1990. +      continue;
  1991. +    }
  1992. +
  1993. +    password_client = open_socket_out(SOCK_STREAM, &dest_ip, port);
  1994. +    if (password_client >= 0) {
  1995. +      DEBUG(3,("connected to password server %s\n",p));
  1996. +      StrnCpy(pserver,p,sizeof(pserver)-1);
  1997. +      break;
  1998. +    }
  1999.    }
  2000.  
  2001. -  password_client = open_socket_out(SOCK_STREAM, &dest_ip, port);
  2002.    if (password_client < 0) {
  2003. -    DEBUG(1,("%s not available\n",pserver));
  2004. +    DEBUG(1,("password server not available\n"));
  2005.      return(False);
  2006.    }
  2007.  
  2008. -  DEBUG(3,("connected to password server %s\n",pserver));
  2009.  
  2010.    /* send a session request (RFC 8002) */
  2011.  
  2012. @@ -1345,7 +1363,6 @@
  2013.  BOOL server_validate(char *buf)
  2014.  {
  2015.    pstring inbuf,outbuf;  
  2016. -  char *pserver = lp_passwordserver();
  2017.    BOOL ret;
  2018.  
  2019.    if (password_client < 0) {
  2020. diff -u -r --new-file last-version/source/pcap.c samba-1.9.15p7/source/pcap.c
  2021. --- last-version/source/pcap.c    Fri Nov 24 11:59:49 1995
  2022. +++ samba-1.9.15p7/source/pcap.c    Tue Dec 12 13:21:01 1995
  2023. @@ -117,7 +117,7 @@
  2024.               if ((p=strchr(line,':')))
  2025.               {
  2026.                   *p = '\0';
  2027. -                p = strtok(line,':');
  2028. +                p = strtok(line,":");
  2029.                  if (strcmp(p,"bsh")!=0)
  2030.                    {
  2031.                      strcpy(name,p);
  2032. diff -u -r --new-file last-version/source/printing.c samba-1.9.15p7/source/printing.c
  2033. --- last-version/source/printing.c    Mon Dec  4 10:49:03 1995
  2034. +++ samba-1.9.15p7/source/printing.c    Mon Jan 15 12:29:51 1996
  2035. @@ -196,49 +196,83 @@
  2036.  Warning: no daemon present
  2037.  Rank   Owner      Job  Files                                 Total Size
  2038.  1st    tridge     148  README                                8096 bytes
  2039. +
  2040. +here is an example of lpq output under osf/1
  2041. +
  2042. +Warning: no daemon present
  2043. +Rank   Pri Owner      Job  Files                             Total Size
  2044. +1st    0   tridge     148  README                            8096 bytes
  2045.  ****************************************************************************/
  2046.  static BOOL parse_lpq_bsd(char *line,print_queue_struct *buf,BOOL first)
  2047.  {
  2048. -  string tok[5];
  2049. +#ifdef    OSF1
  2050. +#define    RANKTOK    0
  2051. +#define    PRIOTOK 1
  2052. +#define    USERTOK 2
  2053. +#define    JOBTOK    3
  2054. +#define    FILETOK    4
  2055. +#define    TOTALTOK 5
  2056. +#define    NTOK    6
  2057. +#else    /* OSF1 */
  2058. +#define    RANKTOK    0
  2059. +#define    USERTOK 1
  2060. +#define    JOBTOK    2
  2061. +#define    FILETOK    3
  2062. +#define    TOTALTOK 4
  2063. +#define    NTOK    5
  2064. +#endif    /* OSF1 */
  2065. +
  2066. +  string tok[NTOK];
  2067.    int count=0;
  2068.  
  2069. +#ifdef    OSF1
  2070. +  int length;
  2071. +  length = strlen(line);
  2072. +  if (line[length-3] == ':')
  2073. +    return(False);
  2074. +#endif    /* OSF1 */
  2075. +
  2076.    /* handle the case of "(standard input)" as a filename */
  2077.    string_sub(line,"standard input","STDIN");
  2078.    string_sub(line,"(","\"");
  2079.    string_sub(line,")","\"");
  2080.    
  2081. -  for (count=0; count<5 && next_token(&line,tok[count],NULL); count++) ;
  2082. +  for (count=0; count<NTOK && next_token(&line,tok[count],NULL); count++) ;
  2083.  
  2084. -  /* we must get 5 tokens */
  2085. -  if (count < 5)
  2086. +  /* we must get NTOK tokens */
  2087. +  if (count < NTOK)
  2088.      return(False);
  2089.  
  2090. -  /* the 3rd and 5th columns must be integer */
  2091. -  if (!isdigit(*tok[2]) || !isdigit(*tok[4])) return(False);
  2092. +  /* the Job and Total columns must be integer */
  2093. +  if (!isdigit(*tok[JOBTOK]) || !isdigit(*tok[TOTALTOK])) return(False);
  2094.  
  2095.    /* if the fname contains a space then use STDIN */
  2096. -  if (strchr(tok[3],' '))
  2097. -    strcpy(tok[3],"STDIN");
  2098. +  if (strchr(tok[FILETOK],' '))
  2099. +    strcpy(tok[FILETOK],"STDIN");
  2100.  
  2101.    /* only take the last part of the filename */
  2102.    {
  2103.      string tmp;
  2104. -    char *p = strrchr(tok[3],'/');
  2105. +    char *p = strrchr(tok[FILETOK],'/');
  2106.      if (p)
  2107.        {
  2108.      strcpy(tmp,p+1);
  2109. -    strcpy(tok[3],tmp);
  2110. +    strcpy(tok[FILETOK],tmp);
  2111.        }
  2112.    }
  2113.      
  2114.  
  2115. -  buf->job = atoi(tok[2]);
  2116. -  buf->size = atoi(tok[4]);
  2117. -  buf->status = strequal(tok[0],"active")?LPQ_PRINTING:LPQ_QUEUED;
  2118. -  buf->priority = 0;
  2119. +  buf->job = atoi(tok[JOBTOK]);
  2120. +  buf->size = atoi(tok[TOTALTOK]);
  2121. +  buf->status = strequal(tok[RANKTOK],"active")?LPQ_PRINTING:LPQ_QUEUED;
  2122.    buf->time = time(NULL);
  2123. -  StrnCpy(buf->user,tok[1],sizeof(buf->user)-1);
  2124. -  StrnCpy(buf->file,tok[3],sizeof(buf->file)-1);
  2125. +  StrnCpy(buf->user,tok[USERTOK],sizeof(buf->user)-1);
  2126. +  StrnCpy(buf->file,tok[FILETOK],sizeof(buf->file)-1);
  2127. +#ifdef PRIOTOK
  2128. +  buf->priority = atoi(tok[PRIOTOK]);
  2129. +#else
  2130. +  buf->priority = 1;
  2131. +#endif
  2132.    return(True);
  2133.  }
  2134.  
  2135. diff -u -r --new-file last-version/source/reply.c samba-1.9.15p7/source/reply.c
  2136. --- last-version/source/reply.c    Sun Dec  3 19:27:15 1995
  2137. +++ samba-1.9.15p7/source/reply.c    Mon Jan 15 19:32:57 1996
  2138. @@ -363,19 +363,19 @@
  2139.      guest = True;
  2140.    
  2141.        /* now check if it's a valid username/password */
  2142. -    /* If an NT password was supplied try and validate with that
  2143. -       first. This is superior as the passwords are mixed case 128 length unicode */
  2144. -    if(smb_ntpasslen && !guest)
  2145. +      /* If an NT password was supplied try and validate with that
  2146. +     first. This is superior as the passwords are mixed case 128 length unicode */
  2147. +      if(smb_ntpasslen && !guest)
  2148.      {
  2149. -        if(!password_ok(user,smb_ntpasswd,smb_ntpasslen,NULL,True))
  2150. -            DEBUG(0,("NT Password did not match ! Defaulting to Lanman\n"));
  2151. -        else
  2152. -            valid_nt_password = True;
  2153. +      if(!password_ok(user,smb_ntpasswd,smb_ntpasslen,NULL,True))
  2154. +        DEBUG(0,("NT Password did not match ! Defaulting to Lanman\n"));
  2155. +      else
  2156. +        valid_nt_password = True;
  2157.      } 
  2158. -    if (!valid_nt_password && !guest && !password_ok(user,smb_apasswd,smb_apasslen,NULL,False))
  2159. +      if (!valid_nt_password && !guest && !password_ok(user,smb_apasswd,smb_apasslen,NULL,False))
  2160.      {
  2161.  #if !GUEST_SESSSETUP
  2162. -      if (lp_security() >= SEC_USER)
  2163. +      if (lp_security() >= SEC_USER && Get_Pwnam(user,True))
  2164.          return(ERROR(ERRSRV,ERRbadpw));
  2165.  #endif
  2166.         if (*smb_apasswd || !Get_Pwnam(user,True))
  2167. diff -u -r --new-file last-version/source/server.c samba-1.9.15p7/source/server.c
  2168. --- last-version/source/server.c    Tue Dec  5 15:57:11 1995
  2169. +++ samba-1.9.15p7/source/server.c    Mon Jan 15 13:08:53 1996
  2170. @@ -435,7 +435,7 @@
  2171.  
  2172.    /* now match each part of the path name separately, trying the names
  2173.       as is first, then trying to scan the directory for matching names */
  2174. -  for (;start;start = (end?end+1:NULL)) 
  2175. +  for (;start;start = (end?end+1:(char *)NULL)) 
  2176.      {
  2177.        /* pinpoint the end of this section of the filename */
  2178.        end = strchr(start, '/');
  2179. @@ -712,6 +712,7 @@
  2180.  int disk_free(char *path,int *bsize,int *dfree,int *dsize)
  2181.  {
  2182.    char *df_command = lp_dfree_command();
  2183. +#ifndef NO_STATFS
  2184.  #ifdef USE_STATVFS
  2185.    struct statvfs fs;
  2186.  #else
  2187. @@ -721,6 +722,7 @@
  2188.    struct statfs fs;
  2189.  #endif
  2190.  #endif
  2191. +#endif
  2192.  
  2193.  #ifdef QUOTAS
  2194.    if (disk_quotas(path, bsize, dfree, dsize))
  2195. @@ -764,7 +766,10 @@
  2196.        return(((*bsize)/1024)*(*dfree));
  2197.      }
  2198.  
  2199. -
  2200. +#ifdef NO_STATFS
  2201. +  DEBUG(1,("Warning - no statfs function\n"));
  2202. +  return(1);
  2203. +#else
  2204.  #ifdef STATFS4
  2205.    if (statfs(path,&fs,sizeof(fs),0) != 0)
  2206.  #else
  2207. @@ -829,6 +834,7 @@
  2208.        *dfree = MAX(1,*dfree);
  2209.      }
  2210.    return(((*bsize)/1024)*(*dfree));
  2211. +#endif
  2212.  }
  2213.  
  2214.  
  2215. @@ -992,7 +998,10 @@
  2216.  
  2217.    if (Files[fnum].fd >= 0)
  2218.      {
  2219. +      struct stat st;
  2220.        Connections[cnum].num_files_open++;
  2221. +      fstat(Files[fnum].fd,&st);
  2222. +      Files[fnum].mode = st.st_mode;
  2223.        Files[fnum].open_time = time(NULL);
  2224.        Files[fnum].size = 0;
  2225.        Files[fnum].pos = -1;
  2226. @@ -2018,6 +2027,14 @@
  2227.  }
  2228.  #endif
  2229.  
  2230. +/****************************************************************************
  2231. +  this is called when the client exits abruptly
  2232. +  **************************************************************************/
  2233. +static int sig_pipe()
  2234. +{
  2235. +  exit_server("Got sigpipe\n");
  2236. +  return(0);
  2237. +}
  2238.  
  2239.  /****************************************************************************
  2240.    open the socket communication
  2241. @@ -2070,7 +2087,7 @@
  2242.  
  2243.  #ifdef NO_FORK_DEBUG
  2244.  #ifndef NO_SIGNAL_TEST
  2245. -          signal(SIGPIPE, SIGNAL_CAST Abort);
  2246. +          signal(SIGPIPE, SIGNAL_CAST sig_pipe);
  2247.            signal(SIGCLD, SIGNAL_CAST SIG_DFL);
  2248.  #endif
  2249.        return True;
  2250. @@ -2078,7 +2095,7 @@
  2251.        if (Client != -1 && fork()==0)
  2252.          {
  2253.  #ifndef NO_SIGNAL_TEST
  2254. -          signal(SIGPIPE, SIGNAL_CAST Abort);
  2255. +          signal(SIGPIPE, SIGNAL_CAST sig_pipe);
  2256.            signal(SIGCLD, SIGNAL_CAST SIG_DFL);
  2257.  #endif
  2258.            /* close our standard file descriptors */
  2259. @@ -2098,7 +2115,7 @@
  2260.        /* We will abort gracefully when the client or remote system 
  2261.       goes away */
  2262.  #ifndef NO_SIGNAL_TEST
  2263. -      signal(SIGPIPE, SIGNAL_CAST Abort);
  2264. +      signal(SIGPIPE, SIGNAL_CAST sig_pipe);
  2265.  #endif
  2266.        Client = dup(0);
  2267.  
  2268. @@ -2850,7 +2867,7 @@
  2269.  {
  2270.    extern fstring remote_arch;
  2271.    int outsize = set_message(outbuf,1,0,True);
  2272. -  int Index;
  2273. +  int Index=0;
  2274.    int choice= -1;
  2275.    int protocol;
  2276.    char *p;
  2277. @@ -2861,7 +2878,7 @@
  2278.    while (p < (smb_buf(inbuf) + bcc))
  2279.      { 
  2280.        Index++;
  2281. -      DEBUG(1,("Requested protocol [%s]\n",p));
  2282. +      DEBUG(3,("Requested protocol [%s]\n",p));
  2283.        if (strcsequal(p,"Windows for Workgroups 3.1a"))
  2284.      arch &= ( ARCH_WFWG | ARCH_WIN95 | ARCH_WINNT );
  2285.        else if (strcsequal(p,"DOS LM1.2X002"))
  2286. @@ -2938,7 +2955,7 @@
  2287.      strcpy(remote_proto,supported_protocols[protocol].short_name);
  2288.      reload_services(True);          
  2289.      outsize = supported_protocols[protocol].proto_reply_fn(outbuf);
  2290. -    DEBUG(1,("Selected protocol %s\n",supported_protocols[protocol].proto_name));
  2291. +    DEBUG(3,("Selected protocol %s\n",supported_protocols[protocol].proto_name));
  2292.    }
  2293.    else {
  2294.      DEBUG(0,("No protocol supported !\n"));
  2295. @@ -3261,7 +3278,7 @@
  2296.    if ((p=strrchr(dname,'/'))) *p=0;
  2297.    strcat(dname,"/corefiles");
  2298.    mkdir(dname,0700);
  2299. -  chown(dname,getuid(),getgid());
  2300. +  sys_chown(dname,getuid(),getgid());
  2301.    chmod(dname,0700);
  2302.    if (chdir(dname)) return(False);
  2303.    umask(~(0700));
  2304. @@ -3297,7 +3314,7 @@
  2305.    firsttime = 0;
  2306.  
  2307.    unbecome_user();
  2308. -  DEBUG(1,("Closing connections\n"));
  2309. +  DEBUG(2,("Closing connections\n"));
  2310.    for (i=0;i<MAX_CONNECTIONS;i++)
  2311.      if (Connections[i].open)
  2312.        close_cnum(i,-1);
  2313. @@ -4145,9 +4162,7 @@
  2314.  
  2315.        if (*lp_rootdir())
  2316.      {
  2317. -      chroot(lp_rootdir());
  2318. -  
  2319. -      if (DEBUGLEVEL > 1)
  2320. +      if (sys_chroot(lp_rootdir()) == 0)
  2321.          DEBUG(2,("%s changed root to %s\n",timestring(),lp_rootdir()));
  2322.      }
  2323.  
  2324. diff -u -r --new-file last-version/source/smb.h samba-1.9.15p7/source/smb.h
  2325. --- last-version/source/smb.h    Mon Dec  4 11:47:31 1995
  2326. +++ samba-1.9.15p7/source/smb.h    Mon Jan 15 14:14:46 1996
  2327. @@ -242,24 +242,25 @@
  2328.          } write_bmpx_struct;
  2329.  
  2330.  typedef struct
  2331. -    {
  2332. -    int cnum;
  2333. -    int fd;
  2334. -    int pos;
  2335. -    int size;
  2336. -    char *mmap_ptr;
  2337. -    int mmap_size;
  2338. -    write_bmpx_struct *wbmpx_ptr;
  2339. -    time_t open_time;
  2340. -    BOOL open;
  2341. -    BOOL can_lock;
  2342. -    BOOL can_read;
  2343. -    BOOL can_write;
  2344. -    BOOL share_mode;
  2345. -    BOOL share_pending;
  2346. -    BOOL print_file;
  2347. -    char *name;
  2348. -    } files_struct;
  2349. +{
  2350. +  int cnum;
  2351. +  int fd;
  2352. +  int pos;
  2353. +  int size;
  2354. +  int mode;
  2355. +  char *mmap_ptr;
  2356. +  int mmap_size;
  2357. +  write_bmpx_struct *wbmpx_ptr;
  2358. +  time_t open_time;
  2359. +  BOOL open;
  2360. +  BOOL can_lock;
  2361. +  BOOL can_read;
  2362. +  BOOL can_write;
  2363. +  BOOL share_mode;
  2364. +  BOOL share_pending;
  2365. +  BOOL print_file;
  2366. +  char *name;
  2367. +} files_struct;
  2368.  
  2369.  
  2370.  struct uid_cache {
  2371. @@ -658,6 +659,8 @@
  2372.  void del_printqueue(int cnum,int snum,int jobid);
  2373.  BOOL strisnormal(char *s);
  2374.  BOOL check_mangled_stack(char *s);
  2375. +int sys_chown(char *fname,int uid,int gid);
  2376. +int sys_chroot(char *dname);
  2377.  BOOL next_token(char **ptr,char *buff,char *sep);
  2378.  void invalidate_uid(int uid);
  2379.  char *fgets_slash(char *s,int maxlen,FILE *f);
  2380. @@ -666,7 +669,7 @@
  2381.  BOOL process_exists(int pid);
  2382.  BOOL chgpasswd(char *name,char *oldpass,char *newpass);
  2383.  void array_promote(char *array,int elsize,int element);
  2384. -void string_replace(char *s,char old,char new);
  2385. +void string_replace(char *s,char oldc,char newc);
  2386.  BOOL user_in_list(char *user,char *list);
  2387.  BOOL string_sub(char *s,char *pattern,char *insert);
  2388.  char *StrnCpy(char *dest,const char *src,int n);
  2389. @@ -774,7 +777,7 @@
  2390.  BOOL reduce_name(char *s,char *dir,BOOL widelinks);
  2391.  void strlower(char *s);
  2392.  void strnorm(char *s);
  2393. -char *smb_buf();
  2394. +char *smb_buf(char *buf);
  2395.  char *smb_trans2_param(char *buf);
  2396.  char *smb_trans2_data(char *buf);
  2397.  BOOL strequal(char *,char *);
  2398. diff -u -r --new-file last-version/source/status.c samba-1.9.15p7/source/status.c
  2399. --- last-version/source/status.c    Sat Dec  2 19:32:46 1995
  2400. +++ samba-1.9.15p7/source/status.c    Mon Jan 15 18:40:10 1996
  2401. @@ -46,7 +46,7 @@
  2402.  int main(int argc, char *argv[])
  2403.  {
  2404.    FILE *f;
  2405. -  pstring fname="";
  2406. +  pstring fname;
  2407.    int uid, c, n;
  2408.    static pstring servicesf = CONFIGFILE;
  2409.    extern char *optarg;
  2410. diff -u -r --new-file last-version/source/system.c samba-1.9.15p7/source/system.c
  2411. --- last-version/source/system.c    Mon Nov 13 17:35:06 1995
  2412. +++ samba-1.9.15p7/source/system.c    Mon Jan 15 13:12:05 1996
  2413. @@ -199,3 +199,26 @@
  2414.  }
  2415.  
  2416.  
  2417. +/*******************************************************************
  2418. +chown isn't used much but OS/2 doesn't have it
  2419. +********************************************************************/
  2420. +int sys_chown(char *fname,int uid,int gid)
  2421. +{
  2422. +#ifdef NO_CHOWN
  2423. +  DEBUG(1,("Warning - chown(%s,%d,%d) not done\n",fname,uid,gid));
  2424. +#else
  2425. +  return(chown(fname,uid,gid));
  2426. +#endif
  2427. +}
  2428. +
  2429. +/*******************************************************************
  2430. +os/2 also doesn't have chroot
  2431. +********************************************************************/
  2432. +int sys_chroot(char *dname)
  2433. +{
  2434. +#ifdef NO_CHROOT
  2435. +  DEBUG(1,("Warning - chroot(%s) not done\n",dname));
  2436. +#else
  2437. +  return(chroot(dname));
  2438. +#endif
  2439. +}
  2440. diff -u -r --new-file last-version/source/username.c samba-1.9.15p7/source/username.c
  2441. --- last-version/source/username.c    Mon Nov 13 16:30:59 1995
  2442. +++ samba-1.9.15p7/source/username.c    Sun Jan 14 18:12:47 1996
  2443. @@ -128,14 +128,6 @@
  2444.      }
  2445.  #endif
  2446.  
  2447. -#if defined(NEXT)&&defined(i386)
  2448. -      /* Workaround for NS 3.2 posix bug in getpwnam() */
  2449. -      if (!ret->pw_uid && ret->pw_short_pad1)
  2450. -    ret->pw_uid = ret->pw_short_pad1;
  2451. -      if (!ret->pw_gid && ret->pw_short_pad2)
  2452. -    ret->pw_gid = ret->pw_short_pad2;
  2453. -#endif
  2454. -
  2455.      }
  2456.  
  2457.    return(ret);
  2458. diff -u -r --new-file last-version/source/util.c samba-1.9.15p7/source/util.c
  2459. --- last-version/source/util.c    Tue Dec  5 13:19:19 1995
  2460. +++ samba-1.9.15p7/source/util.c    Mon Jan 15 19:44:25 1996
  2461. @@ -419,7 +419,11 @@
  2462.    tm_utc = *(gmtime(&t));
  2463.    tm_local = *(localtime(&t));
  2464.  
  2465. +#ifdef HAVE_GMTOFF
  2466. +  timediff = -tm_local.tm_gmtoff;  
  2467. +#else
  2468.    timediff = mktime(&tm_utc) - mktime(&tm_local);
  2469. +#endif
  2470.  
  2471.    if (serverzone == 0) {
  2472.      serverzone = timediff - DSTDiff(t);
  2473. @@ -469,7 +473,7 @@
  2474.  
  2475.      /* widen the new entry using two bisection searches */
  2476.      while (low+60*60 < dst_table[i].start) {
  2477. -      t = ((low + dst_table[i].start)/2);
  2478. +      t = low + (dst_table[i].start-low)/2;
  2479.        if ((localtime(&t)->tm_isdst?True:False) == is_dst)
  2480.      dst_table[i].start = t;
  2481.        else
  2482. @@ -477,7 +481,7 @@
  2483.      }
  2484.  
  2485.      while (high-60*60 > dst_table[i].end) {
  2486. -      t = ((high + dst_table[i].end)/2);
  2487. +      t = high + (high-dst_table[i].end)/2;
  2488.        if ((localtime(&t)->tm_isdst?True:False) == is_dst)
  2489.      dst_table[i].end = t;
  2490.        else
  2491. @@ -1294,7 +1298,7 @@
  2492.  /****************************************************************************
  2493.    string replace
  2494.  ****************************************************************************/
  2495. -void string_replace(char *s,char old,char new)
  2496. +void string_replace(char *s,char oldc,char newc)
  2497.  {
  2498.    while (*s)
  2499.      {
  2500. @@ -1304,13 +1308,13 @@
  2501.      } else if (is_kana (*s)) {
  2502.          s++;
  2503.      } else {
  2504. -        if (old == *s)
  2505. -        *s = new;
  2506. +        if (oldc == *s)
  2507. +        *s = newc;
  2508.          s++;
  2509.      }
  2510.  #else
  2511. -      if (old == *s)
  2512. -    *s = new;
  2513. +      if (oldc == *s)
  2514. +    *s = newc;
  2515.        s++;
  2516.  #endif /* KANJI */
  2517.      }
  2518. @@ -2118,19 +2122,19 @@
  2519.  ****************************************************************************/
  2520.  static int tval_sub( struct timeval *retval, struct timeval *val1, struct timeval *val2)
  2521.  {
  2522. -    long usecdiff = val1->tv_usec - val2->tv_usec;
  2523. -    long secdiff = val1->tv_sec - val2->tv_sec;
  2524. -    if(usecdiff < 0) {
  2525. -        usecdiff = 1000000 + usecdiff;
  2526. -        secdiff--;
  2527. -    }
  2528. -    retval->tv_sec = secdiff;
  2529. -    retval->tv_usec = usecdiff;
  2530. -    if(secdiff < 0)
  2531. -        return -1;
  2532. -    if(secdiff > 0)
  2533. -        return 1;
  2534. -    return (usecdiff < 0 ) ? -1 : ((usecdiff > 0 ) ? 1 : 0);
  2535. +  int usecdiff = val1->tv_usec - val2->tv_usec;
  2536. +  int secdiff = val1->tv_sec - val2->tv_sec;
  2537. +  if(usecdiff < 0) {
  2538. +    usecdiff = 1000000 + usecdiff;
  2539. +    secdiff--;
  2540. +  }
  2541. +  retval->tv_sec = secdiff;
  2542. +  retval->tv_usec = usecdiff;
  2543. +  if(secdiff < 0)
  2544. +    return -1;
  2545. +  if(secdiff > 0)
  2546. +    return 1;
  2547. +  return (usecdiff < 0 ) ? -1 : ((usecdiff > 0 ) ? 1 : 0);
  2548.  }
  2549.  
  2550.  /****************************************************************************
  2551. @@ -3093,7 +3097,11 @@
  2552.    struct ifreq *ifr=NULL;
  2553.    int i;
  2554.  
  2555. -#ifdef USE_IFREQ
  2556. +#if defined(EVEREST)
  2557. +  int n_interfaces;
  2558. +  struct ifconf ifc;
  2559. +  struct ifreq  *ifreqs;
  2560. +#elif defined(USE_IFREQ)
  2561.    struct ifreq ifreq;
  2562.    struct strioctl strioctl;
  2563.    struct ifconf *ifc;
  2564. @@ -3118,7 +3126,34 @@
  2565.        }
  2566.    
  2567.    /* Get a list of the configured interfaces */
  2568. -#ifdef USE_IFREQ
  2569. +#ifdef EVEREST
  2570. +  /* This is part of SCO Openserver 5: The ioctls are no longer part
  2571. +     if the lower level STREAMS interface glue. They are now real
  2572. +     ioctl calls */
  2573. +
  2574. +  if (ioctl(sock, SIOCGIFANUM, &n_interfaces) < 0) {
  2575. +    DEBUG(0,( "SIOCGIFANUM: %s\n", strerror(errno)));
  2576. +  } else {
  2577. +    DEBUG(0,( "number of interfaces returned is: %d\n", n_interfaces));
  2578. +
  2579. +    ifc.ifc_len = sizeof(struct ifreq) * n_interfaces;
  2580. +    ifc.ifc_buf = (caddr_t) alloca(ifc.ifc_len);
  2581. +
  2582. +    if (ioctl(sock, SIOCGIFCONF, &ifc) < 0)
  2583. +      DEBUG(0, ( "SIOCGIFCONF: %s\n", strerror(errno)));
  2584. +    else {
  2585. +      ifr = ifc.ifc_req;
  2586. +
  2587. +      for (i = 0; i < n_interfaces; ++i) {
  2588. +    if (if_ipaddr->s_addr ==
  2589. +        ((struct sockaddr_in *) &ifr[i].ifr_addr)->sin_addr.s_addr) {
  2590. +      found = True;
  2591. +      break;
  2592. +    }
  2593. +      }
  2594. +    }
  2595. +  }
  2596. +#elif defined(USE_IFREQ)
  2597.    ifc = (struct ifconf *)buff;
  2598.    ifc->ifc_len = BUFSIZ - sizeof(struct ifconf);
  2599.    strioctl.ic_cmd = SIOCGIFCONF;
  2600. @@ -3482,8 +3517,8 @@
  2601.  ****************************************************************************/
  2602.  void Abort(void )
  2603.  {
  2604. -  DEBUG(0,("Abort called. Probably got SIGPIPE\n"));
  2605. -  exit(1);
  2606. +  DEBUG(0,("Probably got SIGPIPE\nExiting\n"));
  2607. +  exit(2);
  2608.  }
  2609.  
  2610.  
  2611. @@ -3664,7 +3699,8 @@
  2612.      { 
  2613.        if (port) {
  2614.      if (port == 139 || port == 137)
  2615. -      DEBUG(dlevel,("bind failed on port %d\n",port)); 
  2616. +      DEBUG(dlevel,("bind failed on port %d (%s)\n",
  2617. +            port,strerror(errno))); 
  2618.      close(res); 
  2619.  
  2620.      if (dlevel > 0 && port < 1000)
  2621. diff -u -r --new-file last-version/source/version.h samba-1.9.15p7/source/version.h
  2622. --- last-version/source/version.h    Tue Dec  5 16:00:09 1995
  2623. +++ samba-1.9.15p7/source/version.h    Mon Jan 15 21:30:44 1996
  2624. @@ -1 +1 @@
  2625. -#define VERSION "1.9.15p6"
  2626. +#define VERSION "1.9.15p7"
  2627. diff -u -r --new-file last-version/source/vt_mode.c samba-1.9.15p7/source/vt_mode.c
  2628. --- last-version/source/vt_mode.c    Wed Nov 22 15:01:00 1995
  2629. +++ samba-1.9.15p7/source/vt_mode.c    Mon Jan 15 17:42:46 1996
  2630. @@ -33,6 +33,7 @@
  2631.      extern char    *strdup();
  2632.  #endif
  2633.  
  2634. +extern int Client;
  2635.  
  2636.  #ifdef LINUX
  2637.  #    define    HAS_VTY
  2638.